Upgrade Rails to version 5.2.1 and adopt code & specs where necessary

Signed-off-by: Sebastian Serth <Sebastian.Serth@student.hpi.de>
This commit is contained in:
Sebastian Serth
2018-09-13 12:21:53 +02:00
parent 108190c242
commit de52db89f0
128 changed files with 786 additions and 422 deletions

View File

@ -17,27 +17,27 @@ describe ErrorTemplateAttributesController do
end
it "should create error_template_attribute" do
expect { post :create, error_template_attribute: { } }.to change(ErrorTemplateAttribute, :count).by(1)
expect { post :create, params: { error_template_attribute: { } } }.to change(ErrorTemplateAttribute, :count).by(1)
expect(response).to redirect_to(error_template_attribute_path(assigns(:error_template_attribute)))
end
it "should show error_template_attribute" do
get :show, id: error_template_attribute
get :show, params: { id: error_template_attribute }
expect(response.status).to eq(200)
end
it "should get edit" do
get :edit, id: error_template_attribute
get :edit, params: { id: error_template_attribute }
expect(response.status).to eq(200)
end
it "should update error_template_attribute" do
patch :update, id: error_template_attribute, error_template_attribute: { }
patch :update, params: { id: error_template_attribute, error_template_attribute: FactoryBot.attributes_for(:error_template_attribute) }
expect(response).to redirect_to(error_template_attribute_path(assigns(:error_template_attribute)))
end
it "should destroy error_template_attribute" do
expect { delete :destroy, id: error_template_attribute }.to change(ErrorTemplateAttribute, :count).by(-1)
expect { delete :destroy, params: { id: error_template_attribute } }.to change(ErrorTemplateAttribute, :count).by(-1)
expect(response).to redirect_to(error_template_attributes_path)
end
end