The personal finance app for everyone
Use consistent language for invite codes
Jose Farias3852b79121d6
diff --git a/lib/tasks/invites.rake b/lib/tasks/invites.rakeindex 021da370..61e385cf 100644--- a/lib/tasks/invites.rake+++ b/lib/tasks/invites.rake@@ -1,5 +1,5 @@namespace :invites do- desc "Create an invitation code"+ desc "Create an invite code"task create: :environment doputs InviteCode.generate!enddiff --git a/test/controllers/registrations_controller_test.rb b/test/controllers/registrations_controller_test.rbindex 4c33cc6e..8d441b83 100644--- a/test/controllers/registrations_controller_test.rb+++ b/test/controllers/registrations_controller_test.rb@@ -15,7 +15,7 @@ class RegistrationsControllerTest < ActionDispatch::IntegrationTestassert_redirected_to root_urlend- test "create when hosted requires an invitation code" do+ test "create when hosted requires an invite code" doENV["HOSTED"] = "true"assert_no_difference "User.count" dodiff --git a/test/models/invite_code_test.rb b/test/models/invite_code_test.rbindex 02df2d7c..b95c0271 100644--- a/test/models/invite_code_test.rb+++ b/test/models/invite_code_test.rb@@ -1,7 +1,7 @@require "test_helper"class InviteCodeTest < ActiveSupport::TestCase- test "claim! destroys the invitation token" do+ test "claim! destroys the invite token" docode = InviteCode.generate!assert_difference "InviteCode.count", -1 do@@ -17,7 +17,7 @@ class InviteCodeTest < ActiveSupport::TestCaseassert_not InviteCode.claim!("invalid")end- test "generate! creates a new invitation and returns its token" do+ test "generate! creates a new invite and returns its token" doassert_difference "InviteCode.count", +1 doassert_equal InviteCode.generate!, InviteCode.last.tokenend