:s/POST/REPLY/g
This commit is contained in:
parent
fc07fcbd9d
commit
08ce46e7ed
|
@ -11,7 +11,7 @@ class UserAction < ActiveRecord::Base
|
|||
WAS_LIKED = 2
|
||||
BOOKMARK = 3
|
||||
NEW_TOPIC = 4
|
||||
POST = 5
|
||||
REPLY = 5
|
||||
RESPONSE= 6
|
||||
MENTION = 7
|
||||
QUOTE = 9
|
||||
|
@ -25,7 +25,7 @@ class UserAction < ActiveRecord::Base
|
|||
GOT_PRIVATE_MESSAGE,
|
||||
BOOKMARK,
|
||||
NEW_TOPIC,
|
||||
POST,
|
||||
REPLY,
|
||||
RESPONSE,
|
||||
LIKE,
|
||||
WAS_LIKED,
|
||||
|
|
|
@ -79,7 +79,7 @@ class UserActionObserver < ActiveRecord::Observer
|
|||
return if model.post_number == 1
|
||||
|
||||
row = {
|
||||
action_type: UserAction::POST,
|
||||
action_type: UserAction::REPLY,
|
||||
user_id: model.user_id,
|
||||
acting_user_id: model.user_id,
|
||||
target_post_id: model.id,
|
||||
|
|
|
@ -72,7 +72,7 @@ en:
|
|||
"2": "Likes Received"
|
||||
"3": "Bookmarks"
|
||||
"4": "Topics"
|
||||
"5": "Posts"
|
||||
"5": "Replies"
|
||||
"6": "Responses"
|
||||
"7": "Mentions"
|
||||
"9": "Quotes"
|
||||
|
|
|
@ -162,7 +162,7 @@ describe UserAction do
|
|||
end
|
||||
|
||||
it 'should not log a post user action' do
|
||||
@post.user.user_actions.where(action_type: UserAction::POST).first.should be_nil
|
||||
@post.user.user_actions.where(action_type: UserAction::REPLY).first.should be_nil
|
||||
end
|
||||
|
||||
|
||||
|
@ -174,7 +174,7 @@ describe UserAction do
|
|||
end
|
||||
|
||||
it 'should log user actions correctly' do
|
||||
@response.user.user_actions.where(action_type: UserAction::POST).first.should_not be_nil
|
||||
@response.user.user_actions.where(action_type: UserAction::REPLY).first.should_not be_nil
|
||||
@post.user.user_actions.where(action_type: UserAction::RESPONSE).first.should_not be_nil
|
||||
@mentioned.user_actions.where(action_type: UserAction::MENTION).first.should_not be_nil
|
||||
@post.user.user_actions.joins(:target_post).where('posts.post_number = 2').count.should == 1
|
||||
|
@ -183,7 +183,7 @@ describe UserAction do
|
|||
it 'should not log a double notification for a post edit' do
|
||||
@response.raw = "here it goes again"
|
||||
@response.save!
|
||||
@response.user.user_actions.where(action_type: UserAction::POST).count.should == 1
|
||||
@response.user.user_actions.where(action_type: UserAction::REPLY).count.should == 1
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue