From c94b98835ccd011bb10f42e150c2a7c5c2d8c5a2 Mon Sep 17 00:00:00 2001 From: Philipp Rothmann Date: Tue, 17 Jan 2023 16:22:56 +0100 Subject: [PATCH] fix articles controller test ActiveModell::Error --- spec/controllers/articles_controller_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/controllers/articles_controller_spec.rb b/spec/controllers/articles_controller_spec.rb index dae89c70..b8772054 100644 --- a/spec/controllers/articles_controller_spec.rb +++ b/spec/controllers/articles_controller_spec.rb @@ -264,7 +264,7 @@ describe ArticlesController, type: :controller do it 'does not update articles if article with same name exists' do get_with_supplier :update_synchronized, params: { articles: { article_a.id => { unit: '2000 g' }, article_b.id => { name: 'AAAA' } } } error_array = [assigns(:updated_articles).first.errors.first, assigns(:updated_articles).last.errors.first] - expect(error_array).to include([:name, 'name is already taken']) + expect(error_array).to include(ActiveModel::Error) expect(response).to have_http_status(:success) end