rename factory_girl_(rails) to factory_bot_(rails)

This commit is contained in:
Ralf Teusner
2017-11-15 15:18:07 +01:00
parent 951b71780c
commit 0e26ab98c8
68 changed files with 253 additions and 253 deletions

View File

@ -6,9 +6,9 @@ describe InternalUserPolicy do
[:create?, :edit?, :index?, :new?, :show?, :update?].each do |action|
permissions(action) do
it 'grants access to admins only' do
expect(subject).to permit(FactoryGirl.build(:admin), InternalUser.new)
expect(subject).to permit(FactoryBot.build(:admin), InternalUser.new)
[:external_user, :teacher].each do |factory_name|
expect(subject).not_to permit(FactoryGirl.build(factory_name), InternalUser.new)
expect(subject).not_to permit(FactoryBot.build(factory_name), InternalUser.new)
end
end
end
@ -18,16 +18,16 @@ 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(FactoryGirl.build(factory_name), FactoryGirl.build(:admin))
expect(subject).not_to permit(FactoryBot.build(factory_name), FactoryGirl.build(:admin))
end
end
end
context 'with a non-admin user' do
it 'grants access to admins only' do
expect(subject).to permit(FactoryGirl.build(:admin), InternalUser.new)
expect(subject).to permit(FactoryBot.build(:admin), InternalUser.new)
[:external_user, :teacher].each do |factory_name|
expect(subject).not_to permit(FactoryGirl.build(factory_name), FactoryGirl.build(:teacher))
expect(subject).not_to permit(FactoryBot.build(factory_name), FactoryGirl.build(:teacher))
end
end
end