Commit e8e8ae4d authored by Shinya Maeda's avatar Shinya Maeda

Fix spec

parent 68f6c61c
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment