spec/ballast/concerns/view_spec.rb in ballast-1.1.2 vs spec/ballast/concerns/view_spec.rb in ballast-1.2.0
- old
+ new
@@ -60,14 +60,15 @@
subject.instance_variable_set(:@javascript_params, {a: "1", b: 2})
end
it "should output Javascript as HTML" do
expect(subject).to receive(:content_tag).with(:tag, '{"a":"1","b":2}', {"data-jid" => "ID"}).and_return("HTML")
- expect(subject.javascript_params(true, :tag, "ID")).to eq("HTML")
+ expect(subject.javascript_params("ID", :tag)).to eq("HTML")
end
it "should return Javascript as Hash" do
expect(subject.javascript_params(false)).to eq({a: "1", b: 2})
+ expect(subject.javascript_params(nil)).to eq({a: "1", b: 2})
end
end
describe "#add_javascript_params" do
before(:each) do
\ No newline at end of file