mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 08:53:38 +08:00
Remove duplication of params in tests.
This commit is contained in:
parent
75172024ca
commit
5c93d07d2a
|
@ -22,7 +22,6 @@ RSpec.describe PostsController do
|
|||
category.set_permissions(staff: :full)
|
||||
category.save!
|
||||
|
||||
# strange API, why is topic id in here twice
|
||||
put "/posts/#{post.id}.json", params: {
|
||||
post: { category_id: category.id, raw: "this is a test edit to post" }
|
||||
}
|
||||
|
|
|
@ -14,8 +14,7 @@ RSpec.describe TopicsController do
|
|||
category.set_permissions(staff: :full)
|
||||
category.save!
|
||||
|
||||
# strange API, why is topic id in here twice
|
||||
put "/t/#{post.topic_id}.json", params: { category_id: category.id, topic_id: post.topic_id }
|
||||
put "/t/#{post.topic_id}.json", params: { category_id: category.id }
|
||||
expect(response.status).not_to eq(200)
|
||||
|
||||
expect(post.topic.category_id).not_to eq(category.id)
|
||||
|
|
Loading…
Reference in New Issue
Block a user