Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added new Gecko user agent check for Windows XP

  • Loading branch information...
commit 82939d67799b22370ba8a52278f2db6e40883f3f 1 parent 4287b07
@gshutler gshutler authored
Showing with 28 additions and 0 deletions.
  1. +28 −0 spec/browsers/gecko_user_agent_spec.rb
View
28 spec/browsers/gecko_user_agent_spec.rb
@@ -215,6 +215,34 @@
end
end
+describe 'Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20100101 Firefox/17.0' do
+ before do
+ @useragent = UserAgent.parse('Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20100101 Firefox/17.0')
+ end
+
+ it_should_behave_like "Firefox browser"
+
+ it "should return '17.0' as its version" do
+ @useragent.version.should == "17.0"
+ end
+
+ it "should return '20100101' as its gecko version" do
+ @useragent.gecko.version.should == "20100101"
+ end
+
+ it "should return 'Windows' as its platform" do
+ @useragent.platform.should == "Windows"
+ end
+
+ it "should return 'Windows XP' as its os" do
+ @useragent.os.should == "Windows XP"
+ end
+
+ it "should return nil as its localization" do
+ @useragent.localization.should be_nil
+ end
+end
+
describe 'UserAgent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0' do
before do
@useragent = UserAgent.parse('Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20100101 Firefox/17.0')
Please sign in to comment.
Something went wrong with that request. Please try again.