DEV: Change flakey posts controller spec (#12506)
This commit is contained in:
parent
371afc45e0
commit
26e1ae17c4
|
@ -414,9 +414,11 @@ describe PostsController do
|
||||||
expect(response).to be_forbidden
|
expect(response).to be_forbidden
|
||||||
end
|
end
|
||||||
|
|
||||||
it "calls revise with valid parameters" do
|
it "updates post's raw attribute" do
|
||||||
PostRevisor.any_instance.expects(:revise!).with(post.user, { raw: 'edited body' , edit_reason: 'typo' }, anything)
|
|
||||||
put "/posts/#{post.id}.json", params: update_params
|
put "/posts/#{post.id}.json", params: update_params
|
||||||
|
|
||||||
|
expect(response.status).to eq(200)
|
||||||
|
expect(post.reload.raw).to eq(update_params[:post][:raw])
|
||||||
end
|
end
|
||||||
|
|
||||||
it "extracts links from the new body" do
|
it "extracts links from the new body" do
|
||||||
|
|
Loading…
Reference in New Issue