Skip to content
This repository was archived by the owner on Mar 29, 2022. It is now read-only.

Commit ea0e178

Browse files
committed
Fix failing specs
1 parent 09f0424 commit ea0e178

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

spec/models/user_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@
556556
describe '#deactivate' do
557557
before do
558558
allow(UserStateTransitionSegmentService)
559-
.to receive(:deactivate).and_return(true)
559+
.to receive(:call).and_return(true)
560560

561561
allow_any_instance_of(User)
562562
.to receive(:last_error).and_return('Octokit::AccountSuspended')

spec/services/github_error_handler_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44

55
RSpec.describe GithubErrorHandler do
66
let(:user) { FactoryBot.create(:user) }
7+
8+
# stub API call that will happen due to User#deactivate
9+
before do
10+
allow(UserStateTransitionSegmentService)
11+
.to receive(:call).and_return(true)
12+
end
13+
714
describe '.process_github_error' do
815
context 'The error is UserNotFoundOnGithubError' do
916
let(:error) { GithubPullRequestService::UserNotFoundOnGithubError.new }

spec/services/import_repos_metadata_service_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
RSpec.describe ImportReposMetadataService do
66
describe '.call' do
77
let(:user) { FactoryBot.create(:user) }
8+
9+
# stub API call that will happen due to User#deactivate
10+
before do
11+
allow(UserStateTransitionSegmentService)
12+
.to receive(:call).and_return(true)
13+
end
14+
815
context 'The user has no PRs' do
916
before do
1017
allow_any_instance_of(PullRequestService)

0 commit comments

Comments
 (0)