diff options
author | azul <azul@leap.se> | 2015-09-30 10:51:21 +0200 |
---|---|---|
committer | azul <azul@leap.se> | 2015-09-30 10:51:21 +0200 |
commit | d45f6c61f6a13be06f1977b857e0cb31e79c5317 (patch) | |
tree | d3089b334c2663ea2fd76cf62dea853bdd57b047 /test/integration/api/srp_test.rb | |
parent | a894966e425f27c31e7da196658c6ddee3fc3714 (diff) | |
parent | d4f10a8d47572bcab4c44878b952146732d64d2e (diff) |
Merge pull request #194 from Alster-Hamburgers/feature/invite_code
Request for feedback on invite code feature
Diffstat (limited to 'test/integration/api/srp_test.rb')
-rw-r--r-- | test/integration/api/srp_test.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/integration/api/srp_test.rb b/test/integration/api/srp_test.rb index fbef47e..463abcd 100644 --- a/test/integration/api/srp_test.rb +++ b/test/integration/api/srp_test.rb @@ -1,5 +1,10 @@ class SrpTest < RackTest + setup do + @testcode = InviteCode.new + @testcode.save! + end + teardown do if @user cleanup_user @@ -32,10 +37,10 @@ class SrpTest < RackTest attr_reader :server_auth - def register_user(login = "integration_test", password = 'srp, verify me!') + def register_user(login = "integration_test", password = 'srp, verify me!', invite_code = @testcode.invite_code) cleanup_user(login) post 'http://api.lvh.me:3000/1/users.json', - user_params(login: login, password: password) + user_params(login: login, password: password, invite_code: invite_code) assert(@user = User.find_by_login(login), 'user should have been created: %s' % last_response_errors) @login = login @password = password |