From d2f92c0700ea7b1784a6a516cd9629ee8c6cb5ab Mon Sep 17 00:00:00 2001 From: Tanisha Payne Date: Tue, 15 Jun 2021 18:55:15 -0400 Subject: [PATCH] create_token added to before(:each) method --- spec/integration/api/restart_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/integration/api/restart_spec.rb b/spec/integration/api/restart_spec.rb index 687a9ed..ba7e437 100644 --- a/spec/integration/api/restart_spec.rb +++ b/spec/integration/api/restart_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' require 'rack/test' -#require 'pry-byebug' + @@ -17,7 +17,7 @@ describe Vmpooler::API::Restart do # https://rubydoc.info/gems/sinatra/Sinatra/Base#reset!-class_method before(:each) do app.reset! - #allow_any_instance_of(Vmpooler::API::Restart).to receive(:exit_process) + allow_any_instance_of(Vmpooler::API::Restart).to receive(:exit_process) end @@ -43,7 +43,7 @@ describe Vmpooler::API::Restart do expect(last_response.status).to eq(401) end - it 'vmpooler restarts when a token is provided' do + it 'vmpooler restarts and returns a 200 when a token is provided' do get "/restart/"