aboutsummaryrefslogtreecommitdiffstats
path: root/spec/features/time_tables_spec.rb
diff options
context:
space:
mode:
authorjpl2017-04-10 15:40:36 +0200
committerjpl2017-04-10 15:40:46 +0200
commit19127ebb18ee3f068ff686bf21bad7472f493186 (patch)
tree4fa625f5fa5bd806d70efaa46ed4a0066c1d972b /spec/features/time_tables_spec.rb
parent14ba8e73fea3a1fb26d1d714d1291e710f95f984 (diff)
downloadchouette-core-19127ebb18ee3f068ff686bf21bad7472f493186.tar.bz2
Refs #2909: Fix tests, updating table builder
Diffstat (limited to 'spec/features/time_tables_spec.rb')
-rw-r--r--spec/features/time_tables_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/features/time_tables_spec.rb b/spec/features/time_tables_spec.rb
index 9ace45f11..66da59fe9 100644
--- a/spec/features/time_tables_spec.rb
+++ b/spec/features/time_tables_spec.rb
@@ -18,7 +18,7 @@ describe "TimeTables", :type => :feature do
context 'user has permission to create time tables' do
it 'shows a create link for time tables' do
- expect(page).to have_content(I18n.t('time_tables.actions.new'))
+ expect(page).to have_content(I18n.t('actions.add'))
end
end
@@ -26,13 +26,13 @@ describe "TimeTables", :type => :feature do
it 'does not show a create link for time tables' do
@user.update_attribute(:permissions, [])
visit referential_time_tables_path(referential)
- expect(page).not_to have_content(I18n.t('time_tables.actions.new'))
+ expect(page).not_to have_content(I18n.t('actions.add'))
end
end
context 'user has permission to edit time tables' do
it 'shows an edit button for time tables' do
- expect(page).to have_css('span.fa.fa-pencil')
+ expect(page).to have_content(I18n.t('actions.edit'))
end
end
@@ -40,13 +40,13 @@ describe "TimeTables", :type => :feature do
it 'does not show a edit link for time tables' do
@user.update_attribute(:permissions, [])
visit referential_time_tables_path(referential)
- expect(page).not_to have_css('span.fa.fa-pencil')
+ expect(page).not_to have_content(I18n.t('actions.add'))
end
end
context 'user has permission to destroy time tables' do
it 'shows a destroy button for time tables' do
- expect(page).to have_css('span.fa.fa-trash-o')
+ expect(page).to have_content(I18n.t('actions.delete'))
end
end
@@ -54,7 +54,7 @@ describe "TimeTables", :type => :feature do
it 'does not show a destroy button for time tables' do
@user.update_attribute(:permissions, [])
visit referential_time_tables_path(referential)
- expect(page).not_to have_css('span.fa.fa-trash-o')
+ expect(page).not_to have_content(I18n.t('actions.delete'))
end
end
@@ -81,7 +81,7 @@ describe "TimeTables", :type => :feature do
it 'does not show a create link for time tables' do
@user.update_attribute(:permissions, [])
visit referential_time_table_path(referential, time_table)
- expect(page).not_to have_content(I18n.t('actions.new'))
+ expect(page).not_to have_content(I18n.t('actions.add'))
end
it 'does not show link to duplicate the time table' do
@@ -123,7 +123,7 @@ describe "TimeTables", :type => :feature do
describe "new" do
it "creates time_table and return to show" do
visit referential_time_tables_path(referential)
- click_link "Ajouter un calendrier"
+ click_link "Ajouter"
fill_in "Nom", :with => "TimeTable 1"
click_button("Valider")
expect(page).to have_content("TimeTable 1")