Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
Added simple test to validate XML output.
Browse files Browse the repository at this point in the history
  • Loading branch information
leftathome committed Aug 16, 2013
1 parent 91dfff2 commit eec5573
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions spec/chef-rundeck_spec.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
require 'spec_helper'
require 'nokogiri'

describe 'ChefRundeck' do
it 'should return false' do
before do
# setup for the following tests
ChefRundeck.config_file = "#{ENV['TRAVIS_BUILD_DIR']}/spec/support/client.rb"
ChefRundeck.username = ENV['USER']
ChefRundeck.web_ui_url = 'https://manage.opscode.com'
ChefRundeck.configure

end
it 'fetch to root should return 200' do
get '/'
last_response.should be_ok
end

it 'fetched document should be Nokogiri-parseable XML document' do
get '/'
Nokogiri::XML(last_response.body).document.should be_true
end
end

0 comments on commit eec5573

Please sign in to comment.