tests for bypassing wildcard or bot list user-agents
This commit is contained in:
parent
801b960cf4
commit
8fcaf4c440
|
@ -1,7 +1,7 @@
|
||||||
PATH
|
PATH
|
||||||
remote: /rails_plugins/mine/impressionist
|
remote: /rails_plugins/mine/impressionist
|
||||||
specs:
|
specs:
|
||||||
impressionist (0.1.0)
|
impressionist (0.1.1)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: http://rubygems.org/
|
remote: http://rubygems.org/
|
||||||
|
|
|
@ -41,5 +41,17 @@ describe WidgetsController do
|
||||||
get "new"
|
get "new"
|
||||||
Impression.all.size.should eq 12
|
Impression.all.size.should eq 12
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "should not log impression when user-agent is in wildcard list" do
|
||||||
|
request.stub!(:user_agent).and_return('somebot')
|
||||||
|
get "show", :id => 1
|
||||||
|
Impression.all.size.should eq 10
|
||||||
|
end
|
||||||
|
|
||||||
|
it "should not log impression when user-agent is in the bot list" do
|
||||||
|
request.stub!(:user_agent).and_return('Acoon Robot v1.50.001')
|
||||||
|
get "show", :id => 1
|
||||||
|
Impression.all.size.should eq 10
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue