mirror of
https://github.com/discourse/discourse.git
synced 2025-09-04 08:47:37 +08:00
Remove duplication of params in tests.
This commit is contained in:
parent
75172024ca
commit
5c93d07d2a
2 changed files with 1 additions and 3 deletions
|
@ -22,7 +22,6 @@ RSpec.describe PostsController do
|
||||||
category.set_permissions(staff: :full)
|
category.set_permissions(staff: :full)
|
||||||
category.save!
|
category.save!
|
||||||
|
|
||||||
# strange API, why is topic id in here twice
|
|
||||||
put "/posts/#{post.id}.json", params: {
|
put "/posts/#{post.id}.json", params: {
|
||||||
post: { category_id: category.id, raw: "this is a test edit to post" }
|
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.set_permissions(staff: :full)
|
||||||
category.save!
|
category.save!
|
||||||
|
|
||||||
# strange API, why is topic id in here twice
|
put "/t/#{post.topic_id}.json", params: { category_id: category.id }
|
||||||
put "/t/#{post.topic_id}.json", params: { category_id: category.id, topic_id: post.topic_id }
|
|
||||||
expect(response.status).not_to eq(200)
|
expect(response.status).not_to eq(200)
|
||||||
|
|
||||||
expect(post.topic.category_id).not_to eq(category.id)
|
expect(post.topic.category_id).not_to eq(category.id)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue