This repository was archived by the owner on Mar 29, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 538
538
describe '#deactivate' do
539
539
before do
540
540
allow ( UserStateTransitionSegmentService )
541
- . to receive ( :deactivate ) . and_return ( true )
541
+ . to receive ( :call ) . and_return ( true )
542
542
543
543
allow_any_instance_of ( User )
544
544
. to receive ( :last_error ) . and_return ( 'Octokit::AccountSuspended' )
Original file line number Diff line number Diff line change 4
4
5
5
RSpec . describe GithubErrorHandler do
6
6
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
+
7
14
describe '.process_github_error' do
8
15
context 'The error is UserNotFoundOnGithubError' do
9
16
let ( :error ) { GithubPullRequestService ::UserNotFoundOnGithubError . new }
Original file line number Diff line number Diff line change 5
5
RSpec . describe ImportReposMetadataService do
6
6
describe '.call' do
7
7
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
+
8
15
context 'The user has no PRs' do
9
16
before do
10
17
allow_any_instance_of ( PullRequestService )
You can’t perform that action at this time.
0 commit comments