diff --git a/spec/models/notice_spec.rb b/spec/models/notice_spec.rb index 5bc8b89..ac035a1 100644 --- a/spec/models/notice_spec.rb +++ b/spec/models/notice_spec.rb @@ -51,7 +51,7 @@ describe Notice do describe "user agent string" do it "should be parsed and human-readable" do notice = Fabricate.build(:notice, :request => {'cgi-data' => {'HTTP_USER_AGENT' => 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16'}}) - notice.user_agent_string.should == 'Chrome 10.0.648.204' + notice.user_agent_string.should == 'Chrome 10.0.648.204 (Intel Mac OS X 10_6_7)' end it "should be nil if HTTP_USER_AGENT is blank" do diff --git a/spec/models/problem_spec.rb b/spec/models/problem_spec.rb index 2a72283..b3614b8 100644 --- a/spec/models/problem_spec.rb +++ b/spec/models/problem_spec.rb @@ -328,7 +328,7 @@ describe Problem do it "adding a notice adds a string to #user_agents" do lambda { Fabricate(:notice, :err => @err, :request => {'cgi-data' => {'HTTP_USER_AGENT' => 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16'}}) - }.should change(@problem, :user_agents).from({}).to({Digest::MD5.hexdigest('Chrome 10.0.648.204') => {'value' => 'Chrome 10.0.648.204', 'count' => 1}}) + }.should change(@problem, :user_agents).from({}).to({Digest::MD5.hexdigest('Chrome 10.0.648.204 (Intel Mac OS X 10_6_7)') => {'value' => 'Chrome 10.0.648.204 (Intel Mac OS X 10_6_7)', 'count' => 1}}) end it "removing a notice removes string from #user_agents" do @@ -336,7 +336,7 @@ describe Problem do lambda { @err.notices.first.destroy @problem.reload - }.should change(@problem, :user_agents).from({Digest::MD5.hexdigest('Chrome 10.0.648.204') => {'value' => 'Chrome 10.0.648.204', 'count' => 1}}).to({}) + }.should change(@problem, :user_agents).from({Digest::MD5.hexdigest('Chrome 10.0.648.204 (Intel Mac OS X 10_6_7)') => {'value' => 'Chrome 10.0.648.204 (Intel Mac OS X 10_6_7)', 'count' => 1}}).to({}) end end -- libgit2 0.21.2