adapt tests
This commit is contained in:
parent
12adfe4289
commit
346e985c49
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue