spec/features/users/sign_up_spec.rb in cadenero-0.0.2.b2 vs spec/features/users/sign_up_spec.rb in cadenero-0.0.2.b3
- old
+ new
@@ -13,14 +13,15 @@
post "#{url}/v1/users", format: :json, user: @user
find_account_by_email
end
feature "User signup" do
- let!(:account) { FactoryGirl.create(:account_with_schema) }
+ let(:account) { FactoryGirl.create(:account_with_schema) }
let(:root_url) { "http://#{account.subdomain}.example.com/" }
scenario "under an account" do
sign_up_user root_url
expect(last_response.status).to eq 201
+ puts "last_response.body: #{last_response.body}"
expect(JSON.parse(last_response.body)["user"]["membership_ids"]).to eq [account.id]
expect(last_request.url).to eq "#{root_url}v1/users"
end
end
\ No newline at end of file