mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 06:48:18 +08:00
remove rails-observers
Rails yanked out observers many many years ago, instead the functionality was yanked out to a gem that is very lightly maintained. For example: if we want to upgrade to rails 5 there is no published gem Internally the usage of observers had quite a few problem. The series of refactors renamed a bunch of classes to give us more clarity and removed some magic.
This commit is contained in:
@ -3,7 +3,6 @@ require 'rails_helper'
|
||||
describe UserAction do
|
||||
|
||||
before do
|
||||
ActiveRecord::Base.observers.enable :all
|
||||
UserActionCreator.enable
|
||||
end
|
||||
|
||||
@ -51,6 +50,8 @@ describe UserAction do
|
||||
end
|
||||
|
||||
it 'includes the events correctly' do
|
||||
PostActionNotifier.enable
|
||||
|
||||
mystats = stats_for_user(user)
|
||||
expecting = [UserAction::NEW_TOPIC, UserAction::NEW_PRIVATE_MESSAGE, UserAction::GOT_PRIVATE_MESSAGE, UserAction::BOOKMARK].sort
|
||||
expect(mystats).to eq(expecting)
|
||||
|
Reference in New Issue
Block a user