Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

504 B
Raw Blame
import Page from './page'

const mockRedirect = vi.fn()

vi.mock('@/next/navigation', () => ({
  redirect: (path: string) => mockRedirect(path),
}))

describe('snippet detail redirect page', () => {
  beforeEach(() => {
    vi.clearAllMocks()
  })

  it('should redirect legacy snippet detail routes to orchestrate', async () => {
    await Page({
      params: Promise.resolve({ snippetId: 'snippet-1' }),
    })

    expect(mockRedirect).toHaveBeenCalledWith('/snippets/snippet-1/orchestrate')
  })
})