diff --git a/test/system/adoptions_test.rb b/test/system/adoptions_test.rb new file mode 100644 index 0000000..04a4df3 --- /dev/null +++ b/test/system/adoptions_test.rb @@ -0,0 +1,17 @@ +require 'application_system_test_case' + +class AdoptionsTest < ApplicationSystemTestCase + test 'marking an animal as adopted' do + visit animals_url + + click_on 'Mark as adopted', match: :first + + fill_in 'Adopter name', with: 'John' + fill_in 'Adoption date', with: '05/09/2020' + + click_on 'Mark as adopted' + + assert_text 'Pet was successfully marked as adopted' + end +end +