API de comptabilité horaire.
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.

team_test.rb 560B

12345678910111213141516171819
  1. require "test_helper"
  2. class TeamTest < ActiveSupport::TestCase
  3. test "team with valid name should be created" do
  4. team = Team.new(name: "Valid name", description: "Random description")
  5. assert team.valid?
  6. end
  7. test "team with taken name should not be created" do
  8. other_team = teams(:one)
  9. team = Team.new(name: other_team.name, description: "Random description")
  10. assert_not team.valid?
  11. end
  12. test "team without name should not be created" do
  13. team = Team.new(description: "Random description")
  14. assert_not team.valid?
  15. end
  16. end