diff --git a/spec/vmpooler/api_spec.rb b/spec/vmpooler/api_spec.rb index 5707e83..246503f 100644 --- a/spec/vmpooler/api_spec.rb +++ b/spec/vmpooler/api_spec.rb @@ -11,13 +11,20 @@ describe Vmpooler::API do describe 'Dashboard' do context '/' do + before { get '/' } + + it { expect(last_response.status).to eq(302) } + it { expect(last_response.location).to eq('http://example.org/dashboard/') } + end + + context '/dashboard/' do let(:config) { { config: {'site_name' => 'test pooler'} } } before do $config = config - get '/' + get '/dashboard/' end it { expect(last_response).to be_ok } @@ -166,4 +173,4 @@ describe Vmpooler::API do end -end \ No newline at end of file +end