API de comptabilité horaire.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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