summaryrefslogtreecommitdiff
path: root/test/unit
diff options
context:
space:
mode:
authorankonym <ankonym@gmail.com>2015-10-02 20:58:29 +0200
committerankonym <ankonym@gmail.com>2015-10-02 20:58:29 +0200
commit6f09343e85ab23c4d81f827bbd47a720f3e2cf7b (patch)
tree0b0cdcdf0646f09a8d17baf9199e993b3151b188 /test/unit
parent82a33300818dd8f6e06856944fe7c658746efca1 (diff)
Update rake task to allow generation of multi-use invites
The rake task now takes a second (optional) argument that sets the number of uses per invite code. If this is omitted, the default number of uses is 1. (This commit also contains some minor code cleanup that removes some stuff that I'd commented out but not removed.)
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/invite_code_test.rb17
1 files changed, 0 insertions, 17 deletions
diff --git a/test/unit/invite_code_test.rb b/test/unit/invite_code_test.rb
index 7e14a03..adaf397 100644
--- a/test/unit/invite_code_test.rb
+++ b/test/unit/invite_code_test.rb
@@ -20,23 +20,6 @@ class InviteCodeTest < ActiveSupport::TestCase
assert_equal code1.invite_count, 0
end
-
- # test "Invite count >0 is not accepted for new account signup" do
- # validator = InviteCodeValidator.new nil
- #
- # user_code = InviteCode.new
- # user_code.invite_count = 1
- # user_code.save
- #
- # user = FactoryGirl.build :user
- # user.invite_code = user_code.invite_code
- #
- # validator.validate(user)
- #
- # assert_equal ["This code has already been used"], user.errors[:invite_code]
- #
- # end
-
test "Invite count >= invite max uses is not accepted for new account signup" do
validator = InviteCodeValidator.new nil