diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-03-11 02:44:41 +0900 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-03-23 17:11:49 +0900 |
commit | 38b1ec2cc04e850ff4898615cf9596de0f6235e1 (patch) | |
tree | 881a8644f9f89362a450876f69937cc48e0dabf5 /spec/controllers/projects/merge_requests_controller_spec.rb | |
parent | ea08e2c8afa468afecede56836b5ceb5dcd1f63e (diff) | |
download | gitlab-ce-38b1ec2cc04e850ff4898615cf9596de0f6235e1.tar.gz |
Fix rspec failure
Diffstat (limited to 'spec/controllers/projects/merge_requests_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/merge_requests_controller_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb index 3bcea2b6517..19c4ba25d1b 100644 --- a/spec/controllers/projects/merge_requests_controller_spec.rb +++ b/spec/controllers/projects/merge_requests_controller_spec.rb @@ -1181,11 +1181,15 @@ describe Projects::MergeRequestsController do describe 'GET status.json' do context 'when accessing status' do + let(:status) do + Gitlab::Ci::Status::Success.new(double('object'), double('user')) + end + before do create(:ci_pipeline, project: merge_request.source_project, ref: merge_request.source_branch, sha: merge_request.diff_head_sha, - status: 'success') + status: :success) get :status, namespace_id: project.namespace, project_id: project, id: merge_request.iid, @@ -1194,7 +1198,7 @@ describe Projects::MergeRequestsController do it 'return a correct pipeline status' do expect(response).to have_http_status(:ok) - expect(json_response['details']['status']['text']).to eq 'passed' + expect(json_response['favicon']).to eq status.favicon end end end |