aboutsummaryrefslogtreecommitdiffstats
path: root/spec/features
diff options
context:
space:
mode:
authorRobertDober2017-04-11 17:26:11 +0200
committerRobertDober2017-04-11 21:01:45 +0200
commit839553dc9e40a8b4ef4020d08f64a06792152df7 (patch)
tree7452338890e97d7dec3d24646d76f75aec27214e /spec/features
parent4a733e13aafd9cc6ff176892e853cd4f2cd13088 (diff)
parent90c62a1a73265056cdf998193395d455f5c4c0b6 (diff)
downloadchouette-core-839553dc9e40a8b4ef4020d08f64a06792152df7.tar.bz2
Merge branch 'master' of github.com:af83/stif-boiv
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/lines_spec.rb8
-rw-r--r--spec/features/routes_spec.rb4
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/features/lines_spec.rb b/spec/features/lines_spec.rb
index bbe3c757b..e7e1e601c 100644
--- a/spec/features/lines_spec.rb
+++ b/spec/features/lines_spec.rb
@@ -20,10 +20,10 @@ describe "Lines", :type => :feature do
end
it 'allows only R in CRUD' do
- expect(page).to have_content(I18n.t('actions.show'))
- expect(page).not_to have_content(I18n.t('actions.edit'))
- expect(page).not_to have_content(I18n.t('actions.destroy'))
- expect(page).not_to have_content(I18n.t('actions.add'))
+ expect(page).to have_link(I18n.t('actions.show'))
+ expect(page).not_to have_link(I18n.t('actions.edit'), href: edit_referential_line_path(referential, lines.first))
+ expect(page).not_to have_link(I18n.t('actions.destroy'), href: referential_line_path(referential, lines.first))
+ expect(page).not_to have_link(I18n.t('actions.add'), href: new_referential_line_path(referential))
end
context 'filtering' do
diff --git a/spec/features/routes_spec.rb b/spec/features/routes_spec.rb
index 36d0e8f87..4b90a6ec6 100644
--- a/spec/features/routes_spec.rb
+++ b/spec/features/routes_spec.rb
@@ -102,7 +102,7 @@ describe "Routes", :type => :feature do
it 'does not show edit buttons for routes' do
@user.update_attribute(:permissions, [])
visit referential_line_path(referential, line)
- expect(page).not_to have_content(I18n.t('actions.edit'))
+ expect(page).not_to have_link(I18n.t('actions.edit'), href: edit_referential_line_route_path(referential, line, route))
end
end
@@ -136,7 +136,7 @@ describe "Routes", :type => :feature do
it 'does not show destroy buttons for routes' do
@user.update_attribute(:permissions, [])
visit referential_line_path(referential, line)
- expect(page).not_to have_content(I18n.t('actions.destroy'))
+ expect(page).not_to have_link(I18n.t('actions.destroy'), href: referential_line_route_path(referential, line, route))
end
end
end