diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-14 01:24:51 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-06-14 01:37:30 +0300 |
commit | 422236c71eb8f1c88e83331b6eb74211fd7ccf49 (patch) | |
tree | 45066da8510fcd65d87eaa390261be94fb58c457 /spec/requests | |
parent | 75a40ad5bcee37f43fcfe89789dbd8c65be56c21 (diff) |
Change `foo.should` syntax to `expect(foo).to` in specs
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/issues_spec.rb | 8 | ||||
-rw-r--r-- | spec/requests/api/merge_requests_spec.rb | 6 | ||||
-rw-r--r-- | spec/requests/api/milestones_spec.rb | 6 | ||||
-rw-r--r-- | spec/requests/api/projects_spec.rb | 6 |
4 files changed, 13 insertions, 13 deletions
diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb index 8770786f49a..5e65ad18c0e 100644 --- a/spec/requests/api/issues_spec.rb +++ b/spec/requests/api/issues_spec.rb @@ -196,10 +196,10 @@ describe API::API, api: true do it 'should return a project issue by iid' do get api("/projects/#{project.id}/issues?iid=#{issue.iid}", user) - response.status.should == 200 - json_response.first['title'].should == issue.title - json_response.first['id'].should == issue.id - json_response.first['iid'].should == issue.iid + expect(response.status).to eq 200 + expect(json_response.first['title']).to eq issue.title + expect(json_response.first['id']).to eq issue.id + expect(json_response.first['iid']).to eq issue.iid end it "should return 404 if issue id not found" do diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb index 0ed5883914b..38c67bc9971 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -118,9 +118,9 @@ describe API::API, api: true do it 'should return merge_request by iid' do url = "/projects/#{project.id}/merge_requests?iid=#{merge_request.iid}" get api(url, user) - response.status.should == 200 - json_response.first['title'].should == merge_request.title - json_response.first['id'].should == merge_request.id + expect(response.status).to eq 200 + expect(json_response.first['title']).to eq merge_request.title + expect(json_response.first['id']).to eq merge_request.id end it "should return a 404 error if merge_request_id not found" do diff --git a/spec/requests/api/milestones_spec.rb b/spec/requests/api/milestones_spec.rb index 6890dd1f3a7..db0f6e3c0f5 100644 --- a/spec/requests/api/milestones_spec.rb +++ b/spec/requests/api/milestones_spec.rb @@ -32,9 +32,9 @@ describe API::API, api: true do it 'should return a project milestone by iid' do get api("/projects/#{project.id}/milestones?iid=#{milestone.iid}", user) - response.status.should == 200 - json_response.first['title'].should == milestone.title - json_response.first['id'].should == milestone.id + expect(response.status).to eq 200 + expect(json_response.first['title']).to eq milestone.title + expect(json_response.first['id']).to eq milestone.id end it 'should return 401 error if user not authenticated' do diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index dbfd72e5f19..8fb1509c8b2 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -60,9 +60,9 @@ describe API::API, api: true do it 'should include the project labels as the tag_list' do get api('/projects', user) - response.status.should == 200 - json_response.should be_an Array - json_response.first.keys.should include('tag_list') + expect(response.status).to eq 200 + expect(json_response).to be_an Array + expect(json_response.first.keys).to include('tag_list') end context 'and using search' do |