Sha256: f933f8f57982d4e81afbc47113c78adf7b5727649898c2feda1f2b1287da3639
Contents?: true
Size: 841 Bytes
Versions: 4
Compression:
Stored size: 841 Bytes
Contents
require File.expand_path '../spec_helper.rb', __FILE__ require File.expand_path '../../lib/app.rb', __FILE__ describe 'puppetdb_rundeck Application' do it 'homepage should redirect to api page' do get '/' last_response.should be_redirect follow_redirect! last_request.url.should == 'http://example.org/api' end it 'should allow access to the main api page' do get '/api' last_response.should be_ok last_response.body.should include('Two API endpoints are provided') end it 'should allow access to the xml endpoint' do stub_request(:any, /puppetdb/).to_rack(FakePuppetDB) get '/api/xml' last_response.should be_ok end it 'should allow access to the yaml endpoint' do stub_request(:any, /puppetdb/).to_rack(FakePuppetDB) get '/api/yaml' last_response.should be_ok end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
puppetdb_rundeck-0.2.3 | spec/app_spec.rb |
puppetdb_rundeck-0.2.2 | spec/app_spec.rb |
puppetdb_rundeck-0.2.1 | spec/app_spec.rb |
puppetdb_rundeck-0.2.0 | spec/app_spec.rb |