Fix spec
This commit is contained in:
parent
68f6c61cf6
commit
e8e8ae4d7d
2 changed files with 5 additions and 2 deletions
|
@ -447,7 +447,10 @@ describe CommitStatus do
|
|||
describe 'set failure_reason when drop' do
|
||||
let(:commit_status) { create(:commit_status, :created) }
|
||||
|
||||
subject { commit_status.drop!(reason); commit_status }
|
||||
subject do
|
||||
commit_status.drop!(reason)
|
||||
commit_status
|
||||
end
|
||||
|
||||
context 'when failure_reason is nil' do
|
||||
let(:reason) { }
|
||||
|
|
|
@ -143,7 +143,7 @@ describe API::CommitStatuses do
|
|||
expect(json_response['target_url']).to be_nil
|
||||
expect(json_response['description']).to be_nil
|
||||
if status == 'failed'
|
||||
expect(json_response['failure_reason']).to eq('api_failure')
|
||||
expect(CommitStatus.find(json_response['id'])).to be_api_failure
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue