UX: Use smaller messages for moderator actions.

This commit is contained in:
Robin Ward
2015-07-24 16:39:03 -04:00
parent 326b2812e4
commit bb93a345eb
25 changed files with 171 additions and 60 deletions

View File

@@ -30,7 +30,10 @@ describe TopicStatusUpdate do
TopicStatusUpdate.new(topic, admin).update!("autoclosed", true)
expect(topic.posts.last.raw).to eq(I18n.t("topic_statuses.autoclosed_enabled_minutes", count: 0))
last_post = topic.posts.last
expect(last_post.post_type).to eq(Post.types[:small_action])
expect(last_post.action_code).to eq('autoclosed.enabled')
expect(last_post.raw).to eq(I18n.t("topic_statuses.autoclosed_enabled_minutes", count: 0))
end
it "adds an autoclosed message based on last post" do
@@ -39,7 +42,10 @@ describe TopicStatusUpdate do
TopicStatusUpdate.new(topic, admin).update!("autoclosed", true)
expect(topic.posts.last.raw).to eq(I18n.t("topic_statuses.autoclosed_enabled_lastpost_minutes", count: 0))
last_post = topic.posts.last
expect(last_post.post_type).to eq(Post.types[:small_action])
expect(last_post.action_code).to eq('autoclosed.enabled')
expect(last_post.raw).to eq(I18n.t("topic_statuses.autoclosed_enabled_lastpost_minutes", count: 0))
end
end