mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 03:09:43 +00:00
DEV: Fix flaky instagram onebox spec by not mutating constant.
This commit is contained in:
parent
c161f5e0b2
commit
02b84dbff2
@ -31,8 +31,6 @@ module Onebox
|
||||
attr_reader :url, :uri, :options, :timeout
|
||||
attr :errors
|
||||
|
||||
DEFAULT = {}
|
||||
|
||||
def options=(opt)
|
||||
return @options if opt.nil? # make sure options provided
|
||||
opt = opt.to_h if opt.instance_of?(OpenStruct)
|
||||
@ -42,7 +40,7 @@ module Onebox
|
||||
|
||||
def initialize(url, timeout = nil)
|
||||
@errors = {}
|
||||
@options = DEFAULT
|
||||
@options = {}
|
||||
class_name = self.class.name.split("::").last.to_s
|
||||
|
||||
# Set the engine options extracted from global options.
|
||||
|
Loading…
x
Reference in New Issue
Block a user