spec/gitlab/client/runners_spec.rb in gitlab-4.2.0 vs spec/gitlab/client/runners_spec.rb in gitlab-4.3.0

- old
+ new

@@ -10,15 +10,15 @@ context 'without scope' do before do @runner = Gitlab.runners end - it "should get the correct resource" do + it "gets the correct resource" do expect(a_get("/runners")).to have_been_made end - it "should return a paginated response of runners" do + it "returns a paginated response of runners" do expect(@runner).to be_a Gitlab::PaginatedResponse expect(@runner.first.id).to eq(6) expect(@runner.first.description).to eq('test-1-20150125') end end @@ -27,15 +27,15 @@ before do stub_get("/runners?scope=online", "runners") @runner = Gitlab.runners({scope: :online}) end - it "should get the correct resource" do + it "gets the correct resource" do expect(a_get("/runners").with(query: { scope: :online })).to have_been_made end - it "should return a paginated response of runners" do + it "returns a paginated response of runners" do expect(@runner).to be_a Gitlab::PaginatedResponse expect(@runner.first.id).to eq(6) expect(@runner.first.description).to eq('test-1-20150125') end end @@ -50,15 +50,15 @@ context 'without scope' do before do @runner = Gitlab.all_runners end - it "should get the correct resource" do + it "gets the correct resource" do expect(a_get("/runners/all")).to have_been_made end - it "should return a paginated response of runners" do + it "returns a paginated response of runners" do expect(@runner).to be_a Gitlab::PaginatedResponse expect(@runner.first.id).to eq(6) expect(@runner.first.description).to eq('test-1-20150125') end end @@ -67,15 +67,15 @@ before do stub_get("/runners/all?scope=online", "runners") @runner = Gitlab.all_runners({scope: :online}) end - it "should get the correct resource" do + it "gets the correct resource" do expect(a_get("/runners/all").with(query: { scope: :online })).to have_been_made end - it "should return a paginated response of runners" do + it "returns a paginated response of runners" do expect(@runner).to be_a Gitlab::PaginatedResponse expect(@runner.first.id).to eq(6) expect(@runner.first.description).to eq('test-1-20150125') end end @@ -85,15 +85,15 @@ before do stub_get("/runners/6", "runner") @runners = Gitlab.runner(6) end - it "should get the correct resource" do + it "gets the correct resource" do expect(a_get("/runners/6")).to have_been_made end - it "should return a response of a runner" do + it "returns a response of a runner" do expect(@runners).to be_a Gitlab::ObjectifiedHash expect(@runners.id).to eq(6) expect(@runners.description).to eq('test-1-20150125') end end @@ -102,15 +102,15 @@ before do stub_put("/runners/6", "runner_edit").with(query: { description: "abcefg" }) @runner = Gitlab.update_runner(6, description: "abcefg" ) end - it "should get the correct resource" do + it "gets the correct resource" do expect(a_put("/runners/6").with(query: { description: "abcefg" })).to have_been_made end - it "should return an updated response of a runner" do + it "returns an updated response of a runner" do expect(@runner).to be_a Gitlab::ObjectifiedHash expect(@runner.description).to eq('abcefg') end end @@ -118,15 +118,15 @@ before do stub_delete("/runners/6", "runner_delete") @runner = Gitlab.delete_runner(6) end - it "should get the correct resource" do + it "gets the correct resource" do expect(a_delete("/runners/6")).to have_been_made end - it "should return a response of the deleted runner" do + it "returns a response of the deleted runner" do expect(@runner).to be_a Gitlab::ObjectifiedHash expect(@runner.id).to eq(6) end end @@ -134,15 +134,15 @@ before do stub_get("/projects/1/runners", "project_runners") @runners = Gitlab.project_runners(1) end - it "should get the correct resource" do + it "gets the correct resource" do expect(a_get("/projects/1/runners")).to have_been_made end - it "should return a paginated response of runners" do + it "returns a paginated response of runners" do expect(@runners).to be_a Gitlab::PaginatedResponse expect(@runners.first.id).to eq(8) expect(@runners.first.description).to eq('test-2-20150125') end end @@ -151,15 +151,15 @@ before do stub_post("/projects/1/runners", "runner") @runner = Gitlab.project_enable_runner(1, 6) end - it "should get the correct resource" do + it "gets the correct resource" do expect(a_post("/projects/1/runners")).to have_been_made end - it "should return a response of the enabled runner" do + it "returns a response of the enabled runner" do expect(@runner).to be_a Gitlab::ObjectifiedHash expect(@runner.id).to eq(6) expect(@runner.description).to eq('test-1-20150125') end end @@ -168,18 +168,16 @@ before do stub_delete("/projects/1/runners/6", "runner") @runner = Gitlab.project_disable_runner(1, 6) end - it "should get the correct resource" do + it "gets the correct resource" do expect(a_delete("/projects/1/runners/6")).to have_been_made end - it "should return a response of the disabled runner" do + it "returns a response of the disabled runner" do expect(@runner).to be_a Gitlab::ObjectifiedHash expect(@runner.id).to eq(6) expect(@runner.description).to eq('test-1-20150125') end end - - end