spec/rescue_action_spec.rb in flail-0.0.4 vs spec/rescue_action_spec.rb in flail-0.0.5

- old
+ new

@@ -1,7 +1,8 @@ require 'spec_helper' +require 'ostruct' require 'flail/rails/rescue_action' describe Flail::Rails::RescueAction do context "catching requests" do @@ -38,8 +39,15 @@ it "should send session data" do data = {'one' => 'two'} FlailArmory.process_action_with_error(:session => data) FlailArmory.payload['session_data'].should == data + end + + it "should send user data" do + user = OpenStruct.new(:attributes => {:id => 1, :login => 'jlong'}) + FlailArmory.process_action_with_error(:user => user) + + FlailArmory.payload['user'].should == {'id' => 1, 'login' => 'jlong'} end end end