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