Add spec tests for dashboard redirect

This commit is contained in:
Scott Schneider 2015-04-10 10:03:33 -07:00
parent b6c53cd855
commit 6224a20792

View file

@ -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
end