diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-08-30 19:10:53 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-08-30 19:12:55 -0400 |
commit | 77053a6c217e06770a348ac989992afbd41697f6 (patch) | |
tree | 11df50675162be2045777c1f59c312d359e0d6cf /spec/requests/api/builds_spec.rb | |
parent | 74b995d17b095e326177e7c0e452f0df3a1ab885 (diff) | |
download | gitlab-ci-rs-rspec3.tar.gz |
Convert to RSpec3 syntax via transpecrs-rspec3
Command:
transpec -c 'bundle exec rspec spec -t ~feature' \
-o should,oneliner,should_receive
Diffstat (limited to 'spec/requests/api/builds_spec.rb')
-rw-r--r-- | spec/requests/api/builds_spec.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index b579b36..4c01167 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -22,15 +22,15 @@ describe API::API do post api("/builds/register"), token: runner.token, info: {platform: :darwin} - response.status.should eq 201 - json_response['sha'].should eq build.sha - runner.reload.platform.should eq "darwin" + expect(response.status).to eq 201 + expect(json_response['sha']).to eq build.sha + expect(runner.reload.platform).to eq "darwin" end it "should return 404 error if no pending build found" do post api("/builds/register"), token: runner.token - response.status.should eq 404 + expect(response.status).to eq 404 end it "should return 404 error if no builds for specific runner" do @@ -39,7 +39,7 @@ describe API::API do post api("/builds/register"), token: runner.token - response.status.should eq 404 + expect(response.status).to eq 404 end it "should return 404 error if no builds for shared runner" do @@ -48,7 +48,7 @@ describe API::API do post api("/builds/register"), token: shared_runner.token - response.status.should eq 404 + expect(response.status).to eq 404 end it "returns options" do @@ -57,8 +57,8 @@ describe API::API do post api("/builds/register"), token: runner.token, info: {platform: :darwin} - response.status.should eq 201 - json_response["options"].should eq({"image" => "ruby:2.1", "services" => ["postgres"]}) + expect(response.status).to eq 201 + expect(json_response["options"]).to eq({"image" => "ruby:2.1", "services" => ["postgres"]}) end it "returns variables" do @@ -68,8 +68,8 @@ describe API::API do post api("/builds/register"), token: runner.token, info: {platform: :darwin} - response.status.should eq 201 - json_response["variables"].should eq [ + expect(response.status).to eq 201 + expect(json_response["variables"]).to eq [ {"key" => "DB_NAME", "value" => "postgres", "public" => true}, {"key" => "SECRET_KEY", "value" => "secret_value", "public" => false}, ] @@ -85,8 +85,8 @@ describe API::API do post api("/builds/register"), token: runner.token, info: {platform: :darwin} - response.status.should eq 201 - json_response["variables"].should eq [ + expect(response.status).to eq 201 + expect(json_response["variables"]).to eq [ {"key" => "DB_NAME", "value" => "postgres", "public" => true}, {"key" => "SECRET_KEY", "value" => "secret_value", "public" => false}, {"key" => "TRIGGER_KEY", "value" => "TRIGGER_VALUE", "public" => false}, @@ -101,7 +101,7 @@ describe API::API do it "should update a running build" do build.run! put api("/builds/#{build.id}"), token: runner.token - response.status.should eq 200 + expect(response.status).to eq 200 end it 'Should not override trace information when no trace is given' do |