-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added simple test to validate XML output.
- Loading branch information
1 parent
862dfe4
commit 4bdfa4f
Showing
1 changed file
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |