Commit 2a0f83f5 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix environment folder route when special chars present

parent c848735d
......@@ -164,7 +164,7 @@ constraints(ProjectUrlConstrainer.new) do
end
collection do
get :folder, path: 'folders/:id'
get :folder, path: 'folders/*id', constraints: { format: /(html|json)/ }
end
end
......
......@@ -166,6 +166,25 @@ feature 'Environment', :feature do
end
end
feature 'environment folders', :js do
context 'when folder name contains special charaters' do
before do
create(:environment, project: project,
name: 'staging-1.0/review',
state: :available)
visit folder_namespace_project_environments_path(project.namespace,
project,
id: 'staging-1.0')
end
it 'renders a correct environment folder' do
expect(page).to have_http_status(:ok)
expect(page).to have_content('Environments / staging-1.0')
end
end
end
feature 'auto-close environment when branch is deleted' do
given(:project) { create(:project) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment