From: Tomas Sedovic <[email protected]>
---
src/spec/models/pool_account_spec.rb | 34 ++++++++++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
create mode 100644 src/spec/models/pool_account_spec.rb
diff --git a/src/spec/models/pool_account_spec.rb
b/src/spec/models/pool_account_spec.rb
new file mode 100644
index 0000000..de229a3
--- /dev/null
+++ b/src/spec/models/pool_account_spec.rb
@@ -0,0 +1,34 @@
+require 'spec_helper'
+
+describe PoolAccount do
+
+ before(:each) do
+ @valid_attributes = {:cloud_account_id => 1,
+ :portal_pool_id => 2,
+ :quota_id => 3,
+ :lock_version => 0 }
+ end
+
+ it "should require cloud account" do
+ pa = PoolAccount.new(@valid_attributes.except(:cloud_account_id))
+ pa.should_not be_valid
+
+ pa.cloud_account_id = nil
+ pa.should_not be_valid
+
+ pa.cloud_account_id = 1
+ pa.should be_valid
+ end
+
+ it "should require portal pool" do
+ pa = PoolAccount.new(@valid_attributes.except(:portal_pool_id))
+ pa.should_not be_valid
+
+ pa.portal_pool_id = nil
+ pa.should_not be_valid
+
+ pa.portal_pool_id = 1
+ pa.should be_valid
+ end
+
+end
--
1.6.6.1
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel