require 'json' require 'woopy' # This file was generated by the `rspec --init` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # Require this file using `require "spec_helper.rb"` to ensure that it is only # loaded once. # # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration RSpec.configure do |config| config.treat_symbols_as_metadata_keys_with_true_values = true config.run_all_when_everything_filtered = true config.filter_run :focus end def request_headers(token) {"Content-Type" => "application/json", "X-WoopleToken" => token } end def account_response { account: account_attributes.merge(id: 1) }.to_json end def account_attributes { name: "Account", subdomain: "subdomain1", packages: ["package1", "package2"] } end def user_response { user: user_attributes.merge(id: 1) }.to_json end def user_attributes { name: "User Name", email: "user@example.com" } end def employment_response { employment: employment_attributes.merge(id: 1) }.to_json end def employment_attributes { account_id: 1, user_id: 1 } end def ownership_response { ownership: ownership_attributes.merge(id: 1) }.to_json end def ownership_attributes { account_id: 1, user_id: 1 } end