aboutsummaryrefslogtreecommitdiffstats
path: root/spec/features/time_tables_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/time_tables_spec.rb')
-rw-r--r--spec/features/time_tables_spec.rb46
1 files changed, 23 insertions, 23 deletions
diff --git a/spec/features/time_tables_spec.rb b/spec/features/time_tables_spec.rb
index 573b41150..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
@@ -67,33 +67,33 @@ describe "TimeTables", :type => :feature do
expect(page).to have_content(time_tables.first.comment)
end
- 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'))
- end
-
- it 'does not show link to duplicate the time table' do
- expect(page).to have_content(I18n.t('time_tables.actions.duplicate'))
- end
- end
+ # 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'))
+ # end
+ #
+ # it 'does not show link to duplicate the time table' do
+ # expect(page).to have_content(I18n.t('time_tables.actions.duplicate'))
+ # end
+ # end
context 'user does not have permission to create time tables' 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('time_tables.actions.new'))
+ expect(page).not_to have_content(I18n.t('actions.add'))
end
it 'does not show link to duplicate the time table' do
@user.update_attribute(:permissions, [])
visit referential_time_table_path(referential, time_table)
- expect(page).not_to have_content(I18n.t('time_tables.actions.duplicate'))
+ expect(page).not_to have_content(I18n.t('actions.duplicate'))
end
end
context 'user has permission to edit time tables' do
it 'shows the edit link for time table' do
- expect(page).to have_content(I18n.t('time_tables.actions.edit'))
+ expect(page).to have_content(I18n.t('actions.edit'))
end
end
@@ -101,13 +101,13 @@ describe "TimeTables", :type => :feature do
it 'does not show the edit link for time table' do
@user.update_attribute(:permissions, [])
visit referential_time_table_path(referential, time_table)
- expect(page).not_to have_content(I18n.t('time_tables.actions.edit'))
+ expect(page).not_to have_content(I18n.t('actions.edit'))
end
end
context 'user has permission to destroy time tables' do
it 'shows the destroy link for time table' do
- expect(page).to have_content(I18n.t('time_tables.actions.destroy'))
+ expect(page).to have_content(I18n.t('actions.destroy'))
end
end
@@ -115,7 +115,7 @@ describe "TimeTables", :type => :feature do
it 'does not show a destroy link for time table' do
@user.update_attribute(:permissions, [])
visit referential_time_table_path(referential, time_table)
- expect(page).not_to have_content(I18n.t('time_tables.actions.destroy'))
+ expect(page).not_to have_content(I18n.t('actions.destroy'))
end
end
end
@@ -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")
@@ -133,7 +133,7 @@ describe "TimeTables", :type => :feature do
describe "edit and return to show" do
it "edit time_table" do
visit referential_time_table_path(referential, subject)
- click_link "Editer ce calendrier"
+ click_link "Editer"
fill_in "Nom", :with => "TimeTable Modified"
click_button("Valider")
expect(page).to have_content("TimeTable Modified")