Skip to content

Commit

Permalink
factorybot refactoring
Browse files Browse the repository at this point in the history
Signed-off-by: RoyShravani <[email protected]>
  • Loading branch information
RoyShravani committed Jul 29, 2024
1 parent 18ec2c5 commit 2e464b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/oc-id/spec/controllers/oauth_controllers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
end

context 'as a signed-in non-administrator' do
let(:user) { FactoryGirl.build(:user) }
let(:user) { FactoryBot.build(:user) }

it 'should respond with a 404' do
expect(response.status).to be(404)
end
end

context 'as a signed-in administrator' do
let(:user) { FactoryGirl.build(:administrator) }
let(:user) { FactoryBot.build(:administrator) }

it 'should respond with a 200' do
expect(response.status).to be(200)
Expand Down
6 changes: 3 additions & 3 deletions src/oc-id/spec/requests/authentication_pages_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
it { should have_link 'Sign Up' }

describe 'success' do
let(:user) { FactoryGirl.build(:user) }
let(:user) { FactoryBot.build(:user) }

before do
fill_in 'username', :with => user.username
Expand All @@ -36,7 +36,7 @@
end

describe 'success with email' do
let(:user) { FactoryGirl.build(:user) }
let(:user) { FactoryBot.build(:user) }

before do
fill_in 'username', :with => user.email
Expand All @@ -58,7 +58,7 @@
end

describe 'failure' do
let(:user) { FactoryGirl.build(:user) }
let(:user) { FactoryBot.build(:user) }

before do
fill_in 'username', :with => user.username
Expand Down
2 changes: 1 addition & 1 deletion src/oc-id/spec/support/factories.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'factory_bot'

FactoryGirl.define do
FactoryBot.define do
factory :user do
username 'applejack'
password 'password'
Expand Down

0 comments on commit 2e464b4

Please sign in to comment.