spec/ballast/concerns/errors_handling_spec.rb in ballast-1.5.2 vs spec/ballast/concerns/errors_handling_spec.rb in ballast-1.5.3

- old
+ new

@@ -51,11 +51,11 @@ it "should render an AJAX error" do expect_any_instance_of(RuntimeError).to receive(:backtrace).and_return(["A", "B"]) allow(subject).to receive(:request).and_return(OpenStruct.new(format: :json)) expect(subject).to receive(:is_ajax?).exactly(2).and_return(true, false) - expect(subject).to receive(:send_ajax).with({status: 500, error: "ERROR", data: {type: "Error - RuntimeError", backtrace: "A\nB"}}.with_indifferent_access, {format: :json}) + expect(subject).to receive(:send_ajax).with({status: 500, error: "ERROR", data: {type: "Error - RuntimeError", backtrace: ["A", "B"]}}.with_indifferent_access, {format: :json}) expect(subject).to receive(:send_ajax).with({status: :forbidden, error: "ERROR", data: {type: "TITLE"}}.with_indifferent_access, {format: :json}) subject.handle_error(RuntimeError.new("ERROR"), "LAYOUT") subject.instance_variable_set(:@error, nil) subject.handle_error({title: "TITLE", status: :forbidden, error: "ERROR"}, :json) @@ -65,6 +65,6 @@ allow(subject).to receive(:request).and_return(OpenStruct.new(format: :html)) expect(subject).to receive(:render).with(nothing: true, status: 500, layout: "LAYOUT", formats: [:html]) subject.handle_error(RuntimeError.new("ERROR"), "LAYOUT") end end -end \ No newline at end of file +end