test/rails3/spec/controllers/flash_controller_spec.rb in glow-0.0.11 vs test/rails3/spec/controllers/flash_controller_spec.rb in glow-0.0.12
- old
+ new
@@ -28,6 +28,11 @@
it "should handle unicode on xhr" do
xhr :get, :ajax, type: :notice, message: 'utf8: ✓'
@response.headers['X-Message-Type'].should be == 'notice'
HTMLEntities.new.decode(@response.headers['X-Message']).should be == 'utf8: ✓'
end
+
+ it "should not display flash message on xhr when skip_glow is set" do
+ xhr :get, :ajax, type: :notice, message: 'utf8: ✓', skip_glow: true
+ @response.headers.should_not have_key 'X-Message-Type'
+ end
end