Sha256: 60fcc539557102bb527a7d4d71a1fcaa444ea00f424b9e52d49a06e1d391c1a5

Contents?: true

Size: 1.49 KB

Versions: 3

Compression:

Stored size: 1.49 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_collection_response
  { employments: [employment_attributes.merge(id: 1)] }.to_json
end

def employment_response
  { employment: employment_attributes.merge(id: 1) }.to_json
end

def employment_attributes
  { account_id: 1, user_id: 1 }
end

def roles_attributes
  {roles: ["role1", "role2"] }
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

3 entries across 3 versions & 1 rubygems

Version Path
woopy-0.3.2 spec/spec_helper.rb
woopy-0.3.1 spec/spec_helper.rb
woopy-0.3.0 spec/spec_helper.rb