Check that content_for is cleared

pull/1558/head
Hagen Schink 10 years ago
parent 7d13367573
commit 630a2e799a
  1. 15
      spec/views/common/validation_error.html.erb_spec.rb

@ -0,0 +1,15 @@
require 'spec_helper'
describe "common/_validation_error" do
let(:error_message) { ["Something went completely wrong!"] }
before do
view.content_for(:error_details, 'Clear this!')
render partial: "common/validation_error.html.erb",
locals: { error_messages: error_message,
object_name: "Test" }
end
it { expect(view.content_for(:error_details)).not_to include('Clear this!') }
end
Loading…
Cancel
Save