Nested calls seem to be fun..
This commit is contained in:
Ralf Teusner
2017-11-15 15:37:42 +01:00
parent 960025cbf8
commit fc873cb053
7 changed files with 18 additions and 18 deletions

View File

@ -18,7 +18,7 @@ describe InternalUserPolicy do
context 'with an admin user' do
it 'grants access to no one' do
[:admin, :external_user, :teacher].each do |factory_name|
expect(subject).not_to permit(FactoryBot.build(factory_name), FactoryGirl.build(:admin))
expect(subject).not_to permit(FactoryBot.build(factory_name), FactoryBot.build(:admin))
end
end
end
@ -27,7 +27,7 @@ describe InternalUserPolicy do
it 'grants access to admins only' do
expect(subject).to permit(FactoryBot.build(:admin), InternalUser.new)
[:external_user, :teacher].each do |factory_name|
expect(subject).not_to permit(FactoryBot.build(factory_name), FactoryGirl.build(:teacher))
expect(subject).not_to permit(FactoryBot.build(factory_name), FactoryBot.build(:teacher))
end
end
end