spec/models/spotlight/page_spec.rb in blacklight-spotlight-0.2.0 vs spec/models/spotlight/page_spec.rb in blacklight-spotlight-0.3.0

- old
+ new

@@ -47,6 +47,19 @@ expect(page.should_display_title?).to be_truthy page.title = "" expect(page.should_display_title?).to be_falsey end end + + describe "#content=" do + let(:page) { FactoryGirl.create(:feature_page) } + + it "should work with a serialized JSON array" do + page.content = [].to_json + expect(page.content).to be_a_kind_of SirTrevorRails::BlockArray + end + it "should work with an array" do + page.content = [] + expect(page.content).to be_a_kind_of SirTrevorRails::BlockArray + end + end end