You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
953 B

10 months ago
  1. require "application_system_test_case"
  2. class ScoresTest < ApplicationSystemTestCase
  3. setup do
  4. @score = scores(:one)
  5. end
  6. test "visiting the index" do
  7. visit scores_url
  8. assert_selector "h1", text: "Scores"
  9. end
  10. test "should create score" do
  11. visit scores_url
  12. click_on "New score"
  13. fill_in "Grade", with: @score.grade
  14. fill_in "Name", with: @score.name
  15. click_on "Create Score"
  16. assert_text "Score was successfully created"
  17. click_on "Back"
  18. end
  19. test "should update Score" do
  20. visit score_url(@score)
  21. click_on "Edit this score", match: :first
  22. fill_in "Grade", with: @score.grade
  23. fill_in "Name", with: @score.name
  24. click_on "Update Score"
  25. assert_text "Score was successfully updated"
  26. click_on "Back"
  27. end
  28. test "should destroy Score" do
  29. visit score_url(@score)
  30. click_on "Destroy this score", match: :first
  31. assert_text "Score was successfully destroyed"
  32. end
  33. end