test/test_rack_request.rb in schmobile-0.1.1 vs test/test_rack_request.rb in schmobile-0.1.2
- old
+ new
@@ -10,13 +10,18 @@
end
should "not detect a regular browser as mobile" do
assert !request.is_mobile?
assert !request("HTTP_USER_AGENT" => nil).is_mobile?
+
+ [ :msie6, :msie8, :opera ].each do |browser|
+ agent = self.send(browser)
+ assert request("HTTP_USER_AGENT" => agent).is_mobile?
+ end
end
should "detect mobile units as mobile" do
- [ :ipod, :iphone, :android, :blackberry, :samsung ].each do |phone|
+ [ :ipod, :iphone, :android, :blackberry, :samsung, :palm, :htc_touch, :danger ].each do |phone|
agent = self.send(phone)
assert request("HTTP_USER_AGENT" => agent).is_mobile?
end
end