From 346e985c49ee2670b865709506a40d81d108a51b Mon Sep 17 00:00:00 2001 From: viehlieb Date: Mon, 20 Feb 2023 21:34:29 +0100 Subject: [PATCH] adapt tests --- spec/integration/articles_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/integration/articles_spec.rb b/spec/integration/articles_spec.rb index bbd5e375..84a27cd4 100644 --- a/spec/integration/articles_spec.rb +++ b/spec/integration/articles_spec.rb @@ -80,11 +80,13 @@ feature ArticlesController do describe "handles missing data" do it do find('input[type="submit"]').click # to overview + element = find('#new_articles__price') + element.fill_in with: "" find('input[type="submit"]').click # missing category, re-show form expect(find('tr.alert')).to be_present expect(supplier.articles.count).to eq 0 - all("tr select > option")[1].select_option + element.fill_in with: 5.56 find('input[type="submit"]').click # now it should succeed expect(supplier.articles.count).to eq 1 end