mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 03:18:23 +00:00
REFACTOR: Update test to assert for the right objects.
This commit is contained in:
parent
564e7e6898
commit
9948f57a99
@ -107,13 +107,13 @@ RSpec.describe TopicsController do
|
||||
}
|
||||
end.to change { Topic.count }.by(1)
|
||||
|
||||
expect(Tag.count).to eq(2)
|
||||
expect(response.status).to eq(200)
|
||||
|
||||
result = ::JSON.parse(response.body)
|
||||
|
||||
expect(result['success']).to eq(true)
|
||||
expect(result['url']).to eq(Topic.last.relative_url)
|
||||
expect(Tag.all.pluck(:name)).to contain_exactly("tag1", "tag2")
|
||||
end
|
||||
|
||||
describe 'when topic has been deleted' do
|
||||
|
Loading…
x
Reference in New Issue
Block a user