From a6ba358a8fe5a965a46ca07c8c0382348b2b8d8c Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Wed, 19 Oct 2016 15:25:37 +0300 Subject: Make specs a bit faster --- spec/requests/ci/api/runners_spec.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'spec/requests/ci/api/runners_spec.rb') diff --git a/spec/requests/ci/api/runners_spec.rb b/spec/requests/ci/api/runners_spec.rb index 43596f07cb5..d6c26fd8a94 100644 --- a/spec/requests/ci/api/runners_spec.rb +++ b/spec/requests/ci/api/runners_spec.rb @@ -109,10 +109,12 @@ describe Ci::API::API do end describe "DELETE /runners/delete" do - let!(:runner) { FactoryGirl.create(:ci_runner) } - before { delete ci_api("/runners/delete"), token: runner.token } + it 'returns 200' do + runner = FactoryGirl.create(:ci_runner) + delete ci_api("/runners/delete"), token: runner.token - it { expect(response).to have_http_status 200 } - it { expect(Ci::Runner.count).to eq(0) } + expect(response).to have_http_status 200 + expect(Ci::Runner.count).to eq(0) + end end end -- cgit v1.2.1