mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Add spec tests for dashboard redirect
This commit is contained in:
parent
b6c53cd855
commit
6224a20792
1 changed files with 9 additions and 2 deletions
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue