diff --git a/spec/controllers/notices_controller_spec.rb b/spec/controllers/notices_controller_spec.rb index 5a260f8..6ea5372 100644 --- a/spec/controllers/notices_controller_spec.rb +++ b/spec/controllers/notices_controller_spec.rb @@ -27,32 +27,6 @@ describe NoticesController do response.body.should match(%r{]*>(.+)#{locate_path(notice.id)}}) end - it "should transform xml tags to hashes correctly" do - pending # TODO, need to be test on ErrorReport model - # XML: - notice.env_vars.should have_key('SCRIPT_NAME') - notice.env_vars['SCRIPT_NAME'].should be_nil # blank ends up nil - - # XML representation: - # - # false - # true - # / - # - # - # - # - expected = { - 'secure' => 'false', - 'httponly' => 'true', - 'path' => '/', - 'expire_after' => nil, - 'domain' => nil, - 'id' => nil - } - notice.env_vars.should have_key('rack_session_options') - notice.env_vars['rack_session_options'].should eql(expected) - end end it "generates a notice from xml in a data param [POST]" do diff --git a/spec/models/error_report_spec.rb b/spec/models/error_report_spec.rb index 72fcd2c..ebb7527 100644 --- a/spec/models/error_report_spec.rb +++ b/spec/models/error_report_spec.rb @@ -67,6 +67,31 @@ describe ErrorReport do subject.user_attributes['email'].should == 'mr.bean@example.com' subject.user_attributes['username'].should == 'mrbean' end + it 'valid env_vars' do + # XML: + subject.env_vars.should have_key('SCRIPT_NAME') + subject.env_vars['SCRIPT_NAME'].should be_nil # blank ends up nil + + # XML representation: + # + # false + # true + # / + # + # + # + # + expected = { + 'secure' => 'false', + 'httponly' => 'true', + 'path' => '/', + 'expire_after' => nil, + 'domain' => nil, + 'id' => nil + } + subject.env_vars.should have_key('rack_session_options') + subject.env_vars['rack_session_options'].should eql(expected) + end end it 'save a notice assignes to err' do -- libgit2 0.21.2