discourse/spec/jobs/unsilence_users_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
388 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2018-02-05 11:45:47 -05:00
require "rails_helper"
describe Jobs::UnsilenceUsers do
it "unsilence users" do
user = Fabricate(:user)
UserSilencer.silence(user, Discourse.system_user, silenced_till: 2.days.ago)
user.reload
expect(user.silenced_till).to be
Jobs::UnsilenceUsers.new.execute({})
user.reload
expect(user.silenced_till).to be(nil)
end
end