Sha256: 525e6ad84b7440ce6148617f88eb2223070e28b6ac3bdf62f938d7bc334b38c4
Contents?: true
Size: 1.14 KB
Versions: 4
Compression:
Stored size: 1.14 KB
Contents
require 'spec_helper' describe YogiBerra::Data do before(:each) do YogiBerra::Logger.stub(:log) YogiBerra::Catcher.load_db_settings("#{SPEC_FOLDER}/fixtures/test.yml") end it "should store an exception" do exception = build_exception mock_mongo_client(true, true) YogiBerra::Catcher.quick_connection YogiBerra::Data.store!(exception) end it "should parse an exception" do exception = build_exception parsed_data = YogiBerra::Data.parse_exception(exception) parsed_data[:error_class].should == "Exception" parsed_data[:project].should == "test_yogi_project" parsed_data[:error_message].should == "Exception" parsed_data[:backtraces].size.should > 1 end it "should parse a session" do session = build_session parsed_session = YogiBerra::Data.parse_session(session) parsed_session["password"].should == nil parsed_session["access"]["password"].should == nil parsed_session["access"]["user_id"].should == 30785 parsed_session["access"]["id"].should == 605 parsed_session["access"]["auth_key"].should == "Baseball is ninety percent mental and the other half is physical." end end
Version data entries
4 entries across 4 versions & 1 rubygems