Remove locals option from render_template assertion

The locals option is only supported in ActionView::TestCase, so it is
ignored anyway (even worse, it disabled the complete assertion). I added
some more assertions to ensure the template is rendered with the correct
conversation.

closes #7588
This commit is contained in:
Benjamin Neff 2017-08-27 17:46:43 +02:00
parent 634c13f967
commit 6d7ba96c4f
No known key found for this signature in database
GPG key ID: 971464C3F1A90194

View file

@ -483,7 +483,9 @@ describe ConversationsController, :type => :controller do
it "returns html of conversation" do it "returns html of conversation" do
get :raw, params: {conversation_id: conversation.id} get :raw, params: {conversation_id: conversation.id}
expect(response).to render_template(partial: "show", locals: {conversation: conversation}) expect(response).to render_template(partial: "conversations/_show")
expect(response.body).to include conversation.subject
expect(response.body).to include conversation.messages.first.text
end end
it "returns 404 when requesting non-existant conversation" do it "returns 404 when requesting non-existant conversation" do