diff --git a/tests/Feature/Models/JudgeAdvancementVoteTest.php b/tests/Feature/Models/JudgeAdvancementVoteTest.php new file mode 100644 index 0000000..767cf5a --- /dev/null +++ b/tests/Feature/Models/JudgeAdvancementVoteTest.php @@ -0,0 +1,28 @@ +judge = User::factory()->create(); + $this->entry = Entry::factory()->create(); + $this->vote = JudgeAdvancementVote::create([ + 'user_id' => $this->judge->id, + 'entry_id' => $this->entry->id, + 'vote' => 'pass', + ]); +}); + +test('has a judge', function () { + expect($this->vote->judge)->toBeInstanceOf(User::class) + ->and($this->vote->judge->first_name)->toBe($this->judge->first_name); +}); + +test('has an entry', function () { + expect($this->vote->entry)->toBeInstanceOf(Entry::class) + ->and($this->vote->entry->student->first_name)->toBe($this->entry->student->first_name); +});