mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 06:15:28 +08:00
16 lines
293 B
Ruby
16 lines
293 B
Ruby
require 'rails_helper'
|
|
|
|
describe TrustLevelGranter do
|
|
|
|
describe 'grant' do
|
|
|
|
it 'grants trust level' do
|
|
user = Fabricate(:user, email: "foo@bar.com", trust_level: 0)
|
|
TrustLevelGranter.grant(3, user)
|
|
|
|
user.reload
|
|
expect(user.trust_level).to eq(3)
|
|
end
|
|
end
|
|
end
|