use i18n in specs

pull/1668/head
Markus Kahl 10 years ago
parent 9fda9900df
commit 0e274b9170
  1. 4
      spec/controllers/users_controller_spec.rb
  2. 4
      spec/views/layouts/admin.html.erb_spec.rb

@ -260,7 +260,7 @@ describe UsersController do
end
it 'is shown' do
expect(response.body).to have_selector('a', text: 'New user')
expect(response.body).to have_selector('a', text: I18n.t('label_user_new'))
end
end
@ -276,7 +276,7 @@ describe UsersController do
# you must not be able to create new users if password login is disabled
# as users are managed externally
it 'is hidden' do
expect(response.body).not_to have_selector('a', text: 'New user')
expect(response.body).not_to have_selector('a', text: I18n.t('label_user_new'))
end
end
end

@ -53,7 +53,7 @@ describe 'layouts/admin' do
end
it 'is shown' do
expect(rendered).to have_selector('a', text: 'LDAP authentication')
expect(rendered).to have_selector('a', text: I18n.t('label_ldap_authentication'))
end
end
@ -64,7 +64,7 @@ describe 'layouts/admin' do
end
it 'is hidden' do
expect(rendered).not_to have_selector('a', text: 'LDAP authentication')
expect(rendered).not_to have_selector('a', text: I18n.t('label_ldap_authentication'))
end
end
end

Loading…
Cancel
Save