Sha256: 411290f58f3443d99892159e59e8cc644028b195ad79c562705c48c2937703f1

Contents?: true

Size: 1.33 KB

Versions: 1

Compression:

Stored size: 1.33 KB

Contents

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 accept_request_headers(token)
  {"Accept" => "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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
woopy-0.2.1 spec/spec_helper.rb