Reputation: 3145
I have some logic that uses HTTP_USER_AGENT to determine whether a user is on chrome and ios. I'm at a loss for how to create a test for this. Is there some way in capybara to force the HTTP_USER_AGENT value?
Upvotes: 1
Views: 44
Reputation: 49870
In poltergeist you can do
page.driver.set_headers({'User-Agent' => 'whatever User-Agent you want'})
Upvotes: 2