Created
January 22, 2014 18:46
-
-
Save stbenjam/8564784 to your computer and use it in GitHub Desktop.
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
test "should not save if root password is undefined and host is managed" do | |
Setting[:root_pass] = nil | |
host = Host.create :name => "myfullhost", :managed => true | |
assert !host.valid? | |
assert host.errors[:root_pass].include?("should not be blank") | |
end | |
test "should save if root password is undefined when the compute resource is image capapble" | |
Setting[:root_pass] = nil | |
host = Host.create :name => "myfullhost", :managed => true, :compute_resource_id => compute_resources(:openstack).id | |
host.valid? | |
assert !host.errors[:root_pass].include?("should not be blank") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment