Skip to content

Commit ac08d02

Browse files
committed
add signup#upgrade_url to mocked
1 parent 883b304 commit ac08d02

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/ey-core/requests/signup.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ def signup(_params)
4848
response(
4949
:body => {
5050
"signup" => {
51-
"user_id" => user_id,
52-
"account_id" => account_id,
51+
"user_id" => user_id,
52+
"account_id" => account_id,
53+
"upgrade_url" => "http://login.localdev.engineyard.com:9292/session-tokens/#{self.uuid}/upgrade",
5354
},
5455
},
5556
:status => 201,

spec/signups_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
}
2828
features = [ public_feature.id ]
2929

30-
signup = client.signup(user: user_params, account: account_params, features: features).body["signup"]
30+
signup = client.signup(user: user_params, account: account_params, features: features, redirect_url: "http://redirect.example.com").body["signup"]
3131
user = client.users.get(signup["user_id"])
3232
account = client.accounts.get(signup["account_id"])
3333

@@ -38,6 +38,8 @@
3838

3939
expect(user.accounts).to contain_exactly(account)
4040
expect(account.features.map(&:id)).to include(*features)
41+
42+
expect(signup["upgrade_url"]).not_to be_nil
4143
end
4244
end
4345
end

0 commit comments

Comments
 (0)