diff options
| author | cedricnjanga | 2018-04-24 08:41:44 -0700 | 
|---|---|---|
| committer | cedricnjanga | 2018-04-24 08:41:44 -0700 | 
| commit | 1fd02d51c9fd78900a24f176600c5ee23caaf4cf (patch) | |
| tree | 8da9cff6ea699243f862f76ed9a9f645eaea454d /spec | |
| parent | 32c47f4d0ce0c6ed0f41359ed15178da18b5f5d9 (diff) | |
| download | chouette-core-1fd02d51c9fd78900a24f176600c5ee23caaf4cf.tar.bz2 | |
Fix specs (I18n problem)
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/features/calendars_permissions_spec.rb | 4 | ||||
| -rw-r--r-- | spec/features/routing_constraint_zones_spec.rb | 4 | ||||
| -rw-r--r-- | spec/features/workbenches/workbenches_permissions_spec.rb | 4 | 
3 files changed, 6 insertions, 6 deletions
| diff --git a/spec/features/calendars_permissions_spec.rb b/spec/features/calendars_permissions_spec.rb index 656c0dd78..6b0b782db 100644 --- a/spec/features/calendars_permissions_spec.rb +++ b/spec/features/calendars_permissions_spec.rb @@ -57,14 +57,14 @@ RSpec.describe 'Calendars', type: :feature do        context 'if present → ' do          let( :permission ){ true }          it 'index shows an edit button' do -          expect(page).to have_css('a.btn.btn-default', text: 'Créer') +          expect(page).to have_css('a.btn.btn-default', text: I18n.t('actions.add'))          end        end        context 'if absent → ' do          let( :permission ){ false }          it 'index does not show any edit button' do -          expect(page).not_to have_css('a.btn.btn-default', text: 'Créer') +          expect(page).not_to have_css('a.btn.btn-default', text: I18n.t('actions.add'))          end        end      end diff --git a/spec/features/routing_constraint_zones_spec.rb b/spec/features/routing_constraint_zones_spec.rb index b116b38bd..b3286af82 100644 --- a/spec/features/routing_constraint_zones_spec.rb +++ b/spec/features/routing_constraint_zones_spec.rb @@ -20,7 +20,7 @@ describe 'RoutingConstraintZones', type: :feature do      context 'user has permission to create routing_constraint_zones' do        it 'shows a create link for routing_constraint_zones' do -        expect(page).to have_content(I18n.t('actions.new')) +        expect(page).to have_content(I18n.t('actions.add'))        end      end @@ -28,7 +28,7 @@ describe 'RoutingConstraintZones', type: :feature do        it 'does not show a create link for routing_constraint_zones' do          @user.update_attribute(:permissions, [])          visit referential_line_routing_constraint_zones_path(referential, line) -        expect(page).not_to have_content(I18n.t('actions.new')) +        expect(page).not_to have_content(I18n.t('actions.add'))        end      end diff --git a/spec/features/workbenches/workbenches_permissions_spec.rb b/spec/features/workbenches/workbenches_permissions_spec.rb index 1c073a4c5..a48a6dc64 100644 --- a/spec/features/workbenches/workbenches_permissions_spec.rb +++ b/spec/features/workbenches/workbenches_permissions_spec.rb @@ -23,7 +23,7 @@ describe 'Workbenches', type: :feature do          it 'shows the corresponding button' do            expected_href = new_workbench_referential_path(workbench) -          expect( page ).to have_link('Créer', href: expected_href) +          expect( page ).to have_link(I18n.t('actions.add'), href: expected_href)          end        end @@ -31,7 +31,7 @@ describe 'Workbenches', type: :feature do          let( :permission ){ false }          it 'does not show the corresponding button' do -          expect( page ).not_to have_link('Créer') +          expect( page ).not_to have_link(I18n.t('actions.add'))          end        end        # let!(:ready_referential) { create :referential, workbench: workbench, metadatas: referential_metadatas, ready: true, organisation: @user.organisation } | 
