aboutsummaryrefslogtreecommitdiffstats
path: root/spec/features/workbenches
diff options
context:
space:
mode:
authorZog2018-02-08 10:33:46 +0100
committerLuc Donnet2018-02-20 10:20:18 +0100
commit3dcea81c627c1c740630ce7306bac55256ce8037 (patch)
tree1ff79bdb5f04aba4503b47c781aaa0146d1ac32a /spec/features/workbenches
parent3809301116aec5466445b29637026804da3d6745 (diff)
downloadchouette-core-3dcea81c627c1c740630ce7306bac55256ce8037.tar.bz2
Refs #5863 @6h; Remove workbench id from the querystring
Infer it when possible, and use a nested otherwise
Diffstat (limited to 'spec/features/workbenches')
-rw-r--r--spec/features/workbenches/workbenches_permissions_spec.rb2
-rw-r--r--spec/features/workbenches/workbenches_show_spec.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/features/workbenches/workbenches_permissions_spec.rb b/spec/features/workbenches/workbenches_permissions_spec.rb
index d58293538..1c073a4c5 100644
--- a/spec/features/workbenches/workbenches_permissions_spec.rb
+++ b/spec/features/workbenches/workbenches_permissions_spec.rb
@@ -22,7 +22,7 @@ describe 'Workbenches', type: :feature do
let( :permission ){ true }
it 'shows the corresponding button' do
- expected_href = new_referential_path(workbench_id: workbench)
+ expected_href = new_workbench_referential_path(workbench)
expect( page ).to have_link('Créer', href: expected_href)
end
end
diff --git a/spec/features/workbenches/workbenches_show_spec.rb b/spec/features/workbenches/workbenches_show_spec.rb
index 7be813b94..405fdce82 100644
--- a/spec/features/workbenches/workbenches_show_spec.rb
+++ b/spec/features/workbenches/workbenches_show_spec.rb
@@ -232,7 +232,7 @@ RSpec.describe 'Workbenches', type: :feature do
context 'user has the permission to create referentials' do
it 'shows the link for a new referetnial' do
- expect(page).to have_link(I18n.t('actions.add'), href: new_referential_path(workbench_id: workbench.id))
+ expect(page).to have_link(I18n.t('actions.add'), href: new_workbench_referential_path(workbench))
end
end
@@ -240,7 +240,7 @@ RSpec.describe 'Workbenches', type: :feature do
it 'does not show the clone link for referential' do
@user.update_attribute(:permissions, [])
visit referential_path(referential)
- expect(page).not_to have_link(I18n.t('actions.add'), href: new_referential_path(workbench_id: workbench.id))
+ expect(page).not_to have_link(I18n.t('actions.add'), href: new_workbench_referential_path(workbench))
end
end
end