spec/lib/appsignal/transaction_spec.rb in appsignal-0.11.16 vs spec/lib/appsignal/transaction_spec.rb in appsignal-0.11.17
- old
+ new
@@ -75,10 +75,16 @@
describe '#request' do
subject { transaction.request }
it { should be_a ::Rack::Request }
+
+ context "without env" do
+ let(:env) { nil }
+
+ it { should be_nil }
+ end
end
describe '#set_process_action_event' do
before { transaction.set_process_action_event(process_action_event) }
@@ -728,9 +734,21 @@
end
context "when skipping session data" do
before do
Appsignal.config = {:skip_session_data => true}
+ end
+
+ it "does not pass the session data into the params sanitizer" do
+ Appsignal::ParamsSanitizer.should_not_receive(:sanitize)
+ subject
+ transaction.sanitized_session_data.should == {}
+ end
+ end
+
+ context "without a request" do
+ before do
+ transaction.stub(:request => nil)
end
it "does not pass the session data into the params sanitizer" do
Appsignal::ParamsSanitizer.should_not_receive(:sanitize)
subject