sbfaulkner-sequel_container 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/sequel_container.rb +1 -1
- data/sequel_container.gemspec +1 -1
- data/test/sequel_container_test.rb +18 -0
- metadata +1 -1
data/lib/sequel_container.rb
CHANGED
data/sequel_container.gemspec
CHANGED
@@ -72,4 +72,22 @@ class SequelCascadingTest < Test::Unit::TestCase
|
|
72
72
|
assert_equal Dir.tmpdir+"/companies/#{company.id}/biography.html", company.biography_path
|
73
73
|
assert_equal "/companies/#{company.id}/biography.html", company.biography_url
|
74
74
|
end
|
75
|
+
|
76
|
+
def test_should_be_empty_container_when_type_is_nil
|
77
|
+
company = Company.create :biography_data => ''
|
78
|
+
assert company.reload
|
79
|
+
assert !company.biography?
|
80
|
+
end
|
81
|
+
|
82
|
+
def test_should_be_empty_container_when_type_is_blank
|
83
|
+
company = Company.create :biography_type => '', :biography_data => ''
|
84
|
+
assert company.reload
|
85
|
+
assert !company.biography?
|
86
|
+
end
|
87
|
+
|
88
|
+
def test_should_contain_empty_document_when_type_is_set
|
89
|
+
company = Company.create :biography_type => 'text/plain', :biography_data => ''
|
90
|
+
assert company.reload
|
91
|
+
assert company.biography?
|
92
|
+
end
|
75
93
|
end
|