Code Duplication    Length = 12-14 lines in 2 locations

tests/CreatePromocodesToDatabaseTest.php 2 locations

@@ 22-35 (lines=14) @@
19
    }
20
21
    /** @test */
22
    public function it_can_create_several_promocodes_and_save_in_database()
23
    {
24
        $promocodes = Promocodes::create(10);
25
        $firstPromocode = $promocodes->first();
26
        $lastPromocode = $promocodes->last();
27
28
        $this->assertCount(10, $promocodes);
29
        $this->assertDatabaseHas('promocodes', [
30
            'code' => $firstPromocode['code']
31
        ]);
32
        $this->assertDatabaseHas('promocodes', [
33
            'code' => $lastPromocode['code']
34
        ]);
35
    }
36
37
    /** @test */
38
    public function it_can_set_reward_value_to_promocodes()
@@ 38-49 (lines=12) @@
35
    }
36
37
    /** @test */
38
    public function it_can_set_reward_value_to_promocodes()
39
    {
40
        $promocodes = Promocodes::create(1, 10);
41
        $promocode = $promocodes->first();
42
43
        $this->assertCount(1, $promocodes);
44
        $this->assertEquals(10, $promocode['reward']);
45
        $this->assertDatabaseHas('promocodes', [
46
            'code' => $promocode['code'],
47
            'reward' => $promocode['reward']
48
        ]);
49
    }
50
51
    /** @test */
52
    public function it_can_set_additional_data_to_promocodes()