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
|
describe 'Dashboard' do
|
||||||
|
|
||||||
context '/' 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) { {
|
let(:config) { {
|
||||||
config: {'site_name' => 'test pooler'}
|
config: {'site_name' => 'test pooler'}
|
||||||
} }
|
} }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
$config = config
|
$config = config
|
||||||
get '/'
|
get '/dashboard/'
|
||||||
end
|
end
|
||||||
|
|
||||||
it { expect(last_response).to be_ok }
|
it { expect(last_response).to be_ok }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue