|
|
@@ -74,13 +74,13 @@ shared_examples_for WebRequestConcern do
|
74
|
74
|
ENV['DEFAULT_HTTP_USER_AGENT'] = @default_http_user_agent
|
75
|
75
|
end
|
76
|
76
|
|
77
|
|
- it "should have the default value set by Faraday" do
|
78
|
|
- expect(agent.user_agent).to eq(Faraday.new.headers[:user_agent])
|
|
77
|
+ it "should have the default value of Huginn" do
|
|
78
|
+ expect(agent.user_agent).to eq('Huginn - https://github.com/cantino/huginn')
|
79
|
79
|
end
|
80
|
80
|
|
81
|
81
|
it "should be overridden by the environment variable if present" do
|
82
|
|
- ENV['DEFAULT_HTTP_USER_AGENT'] = 'Huginn - https://github.com/cantino/huginn'
|
83
|
|
- expect(agent.user_agent).to eq('Huginn - https://github.com/cantino/huginn')
|
|
82
|
+ ENV['DEFAULT_HTTP_USER_AGENT'] = 'Something'
|
|
83
|
+ expect(agent.user_agent).to eq('Something')
|
84
|
84
|
end
|
85
|
85
|
|
86
|
86
|
it "should be overriden by the value in options if present" do
|