test/configuration_test.rb in hoptoad_notifier-2.4.2 vs test/configuration_test.rb in hoptoad_notifier-2.4.4
- old
+ new
@@ -27,11 +27,10 @@
HoptoadNotifier::Configuration::DEFAULT_BACKTRACE_FILTERS
assert_config_default :ignore,
HoptoadNotifier::Configuration::IGNORE_DEFAULT
assert_config_default :development_lookup, true
assert_config_default :framework, 'Standalone'
- assert_config_default :js_notifier, false
end
should "provide default values for secure connections" do
config = HoptoadNotifier::Configuration.new
config.secure = true
@@ -83,11 +82,11 @@
[:api_key, :backtrace_filters, :development_environments,
:environment_name, :host, :http_open_timeout,
:http_read_timeout, :ignore, :ignore_by_filters, :ignore_user_agent,
:notifier_name, :notifier_url, :notifier_version, :params_filters,
:project_root, :port, :protocol, :proxy_host, :proxy_pass, :proxy_port,
- :proxy_user, :secure, :development_lookup, :js_notifier].each do |option|
+ :proxy_user, :secure, :development_lookup].each do |option|
assert_equal config[option], hash[option], "Wrong value for #{option}"
end
end
should "be mergable" do
@@ -104,9 +103,17 @@
config = HoptoadNotifier::Configuration.new
config.
expects(:warn).
with(regexp_matches(/deprecated/i))
assert_equal [], config.environment_filters
+ end
+
+ should "warn when attempting to write js_notifier" do
+ config = HoptoadNotifier::Configuration.new
+ config.
+ expects(:warn).
+ with(regexp_matches(/deprecated/i))
+ config.js_notifier = true
end
should "allow ignored user agents to be appended" do
assert_appends_value :ignore_user_agent
end