Merge branch 'master' into feature/default_chatrooms
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Release Drafter / Update release notes draft (pull_request) Successful in 4s

This commit is contained in:
Râu Cao
2023-04-18 17:00:48 +02:00
44 changed files with 540 additions and 139 deletions

View File

@@ -108,7 +108,7 @@ RSpec.describe User, type: :model do
let(:user) { create :user, cn: "willherschel", ou: "kosmos.org" }
it "enables default services" do
expect(user).to receive(:enable_service).with(%w[ discourse ejabberd gitea mediawiki ])
expect(user).to receive(:enable_service).with(%w[ discourse gitea mediawiki xmpp ])
user.send :devise_after_confirmation
end
@@ -120,10 +120,12 @@ RSpec.describe User, type: :model do
expect(job['arguments'][0]['_aj_globalid']).to eq('gid://akkounts/User/1')
end
context "for invited user with ejabberd enabled" do
context "for invited user with xmpp enabled" do
let(:guest) { create :user, id: 2, cn: "isaacnewton", ou: "kosmos.org", email: "newt@example.com" }
before do
# TODO remove when defaults are implemented
user.update! preferences: { xmpp_exchange_contacts_with_invitees: true }
Invitation.create! user: user, invited_user_id: guest.id, used_at: DateTime.now
allow_any_instance_of(User).to receive(:enable_service)
end