mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 16:07:03 +08:00
FEATURE: first pass at user summary page
This commit is contained in:
@ -1607,4 +1607,19 @@ describe UsersController do
|
||||
|
||||
end
|
||||
|
||||
context '#summary' do
|
||||
|
||||
it "generates summary info" do
|
||||
user = Fabricate(:user)
|
||||
create_post(user: user)
|
||||
|
||||
xhr :get, :summary, username: user.username_lower
|
||||
expect(response).to be_success
|
||||
json = JSON.parse(response.body)
|
||||
|
||||
expect(json["user_summary"]["topic_count"]).to eq(1)
|
||||
expect(json["user_summary"]["post_count"]).to eq(1)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user