added 260907 version of worker toolkit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
module ResponseHelpers
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
def response_body
|
||||
@response_body ||= ActiveSupport::HashWithIndifferentAccess.new(
|
||||
(begin
|
||||
JSON.parse(response.body, symbolize_names: true)
|
||||
rescue
|
||||
{}
|
||||
end)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.include ResponseHelpers, type: :controller
|
||||
end
|
||||
Reference in New Issue
Block a user