about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-10-04 19:49:43 +0200
committerThibaut Girka <thib@sitedethib.com>2019-10-04 19:49:43 +0200
commit1bbba0016a8d2a182248e05b5d51e8a6e22bc3f3 (patch)
tree93c92d1aa5ceab241ffdf14cc7e13f41b0f0fdcc /spec
parent360234d1bf1ea8b5c88a96d21156ea351f3e87c2 (diff)
parent83d3e7733da892f5ad94ed2b8757db11250fbe6a (diff)
Merge tag 'v3.0.0' into glitch-soc/merge-upstream
Diffstat (limited to 'spec')
-rw-r--r--spec/services/app_sign_up_service_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/services/app_sign_up_service_spec.rb b/spec/services/app_sign_up_service_spec.rb
index 7948bb53b..e7c7f3ba1 100644
--- a/spec/services/app_sign_up_service_spec.rb
+++ b/spec/services/app_sign_up_service_spec.rb
@@ -38,6 +38,15 @@ RSpec.describe AppSignUpService, type: :service do
       user = User.find_by(id: access_token.resource_owner_id)
       expect(user).to_not be_nil
       expect(user.account).to_not be_nil
+      expect(user.invite_request).to be_nil
+    end
+
+    it 'creates an account with invite request text' do
+      access_token = subject.call(app, good_params.merge(reason: 'Foo bar'))
+      expect(access_token).to_not be_nil
+      user = User.find_by(id: access_token.resource_owner_id)
+      expect(user).to_not be_nil
+      expect(user.invite_request&.text).to eq 'Foo bar'
     end
   end
 end