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); });