Skip to content

Commit

Permalink
fix tests to match newly seeded attribute
Browse files Browse the repository at this point in the history
Signed-off-by: Vinzenz Rosenkranz <[email protected]>
  • Loading branch information
v1r0x committed Dec 12, 2024
1 parent d2ef12a commit 6318ae8
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/Feature/ApiEditorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ public function testAddAttributeToEntityTypeEndpoint()
$response->assertJson([
'entity_type_id' => 3,
'attribute_id' => 3,
'position' => 4,
'position' => 5,
'depends_on' => null,
'attribute' => [
'id' => 3,
Expand Down Expand Up @@ -843,7 +843,8 @@ public function testDeleteEntityTypeEndpoint()
$etCnt = EntityType::count();
$this->assertEquals(5, $etCnt);
$eaCnt = EntityAttribute::count();
$this->assertEquals(23, $eaCnt);
info(EntityAttribute::all());
$this->assertEquals(24, $eaCnt);
$eCnt = Entity::count();
$this->assertEquals(8, $eCnt);
$avCnt = AttributeValue::count();
Expand All @@ -857,7 +858,7 @@ public function testDeleteEntityTypeEndpoint()
$etCnt = EntityType::count();
$this->assertEquals(4, $etCnt);
$eaCnt = EntityAttribute::count();
$this->assertEquals(18, $eaCnt);
$this->assertEquals(19, $eaCnt);
$eCnt = Entity::count();
$this->assertEquals(4, $eCnt);
$avCnt = AttributeValue::count();
Expand All @@ -870,7 +871,7 @@ public function testDeleteEntityTypeEndpoint()
public function testDeleteAttributeEndpoint()
{
$eaCnt = EntityAttribute::count();
$this->assertEquals(23, $eaCnt);
$this->assertEquals(24, $eaCnt);
$avCnt = AttributeValue::count();
$this->assertEquals(25, $avCnt);
$aCnt = Attribute::count();
Expand All @@ -882,7 +883,7 @@ public function testDeleteAttributeEndpoint()
$this->assertStatus($response, 204);

$eaCnt = EntityAttribute::count();
$this->assertEquals(21, $eaCnt);
$this->assertEquals(22, $eaCnt);
$avCnt = AttributeValue::count();
$this->assertEquals(21, $avCnt);
$aCnt = Attribute::count();
Expand All @@ -895,7 +896,7 @@ public function testDeleteAttributeEndpoint()
public function testDeleteAttributeFromEntityTypeEndpoint()
{
$eaCnt = EntityAttribute::count();
$this->assertEquals(23, $eaCnt);
$this->assertEquals(24, $eaCnt);
$avCnt = AttributeValue::count();
$this->assertEquals(25, $avCnt);
$entityType = EntityType::find(5)->load('attributes');
Expand All @@ -917,7 +918,7 @@ public function testDeleteAttributeFromEntityTypeEndpoint()
$this->assertStatus($response, 204);

$eaCnt = EntityAttribute::count();
$this->assertEquals(22, $eaCnt);
$this->assertEquals(23, $eaCnt);
$avCnt = AttributeValue::count();
$this->assertEquals(22, $avCnt);
$entityType = EntityType::find(5)->load('attributes');
Expand Down

0 comments on commit 6318ae8

Please sign in to comment.