spec/spec_helper.rb in woopy-0.1.8 vs spec/spec_helper.rb in woopy-0.2.0

- old
+ new

@@ -11,18 +11,39 @@ config.run_all_when_everything_filtered = true config.filter_run :focus end def request_headers(token) - {"Content-Type" => "application/json", "X-WoopleToken" => 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_account_employment_response + { + employments: [ + { employment: employment_attributes.merge(id: 1) } + ] + }.to_json +end + +def account_employments_response + { + employments: [ + { employment: employment_attributes.merge(id: 1) }, + { employment: employment_attributes.merge(id: 2, user_id: 2,) } + ] + }.to_json end def user_response { user: user_attributes.merge(id: 1) }.to_json end