diff --git a/packages/core/tests/Unit/Models/AttributeGroupTest.php b/packages/core/tests/Unit/Models/AttributeGroupTest.php index 51f50dd622..cce6172807 100644 --- a/packages/core/tests/Unit/Models/AttributeGroupTest.php +++ b/packages/core/tests/Unit/Models/AttributeGroupTest.php @@ -20,12 +20,12 @@ public function can_make_a_attribute_group() 'en' => 'SEO', ], 'handle' => 'seo', - 'position' => 5, ]); $this->assertEquals('SEO', $attributeGroup->name->get('en')); $this->assertEquals('seo', $attributeGroup->handle); - $this->assertEquals(5, $attributeGroup->position); + $this->assertIsInt($attributeGroup->position); + $this->assertGreaterThan(0, $attributeGroup->position); } /** @test */ @@ -37,7 +37,6 @@ public function can_get_associated_attributes() 'en' => 'SEO', ], 'handle' => 'seo', - 'position' => 5, ]); $this->assertCount(0, $attributeGroup->attributes); diff --git a/packages/core/tests/Unit/Models/AttributeTest.php b/packages/core/tests/Unit/Models/AttributeTest.php index f95bfe68d0..0517a8cf64 100644 --- a/packages/core/tests/Unit/Models/AttributeTest.php +++ b/packages/core/tests/Unit/Models/AttributeTest.php @@ -23,7 +23,6 @@ public function can_make_a_attribute() $attribute = Attribute::factory() ->for(AttributeGroup::factory()) ->create([ - 'position' => 4, 'name' => [ 'en' => 'Meta Description', ], @@ -42,7 +41,8 @@ public function can_make_a_attribute() $this->assertEquals('meta_description', $attribute->handle); $this->assertEquals(\Lunar\FieldTypes\Text::class, $attribute->type); $this->assertTrue($attribute->system); - $this->assertEquals(4, $attribute->position); + $this->assertIsInt($attribute->position); + $this->assertGreaterThan(0, $attribute->position); $this->assertEquals($options, $attribute->configuration->get('options')); } }