@@ -49,7 +49,7 @@ func TestPlanPriceRepository(t *testing.T) {
4949 })
5050
5151 t .Run ("GetById_CacheSetCalled" , func (t * testing.T ) {
52- priceId := insertTestPlanPrice (t , db , 5 , "RUB" , 200_000 )
52+ priceId := insertTestPlanPrice (t , db , 2 , "RUB" , 200_000 )
5353
5454 _ , _ = planPriceRepository .GetById (priceId )
5555 cached , cachedErr := planPriceCache .Get (fmt .Sprintf ("GetById_%d" , priceId ))
@@ -61,7 +61,7 @@ func TestPlanPriceRepository(t *testing.T) {
6161
6262 t .Run ("GetById_CacheGetCalled" , func (t * testing.T ) {
6363 expectedId := 100
64- expectedPlanId := 200
64+ expectedPlanId := 3
6565 expectedCents := int64 (3000 )
6666 expectedCurrency := "DKK"
6767 setErr := planPriceCache .Set (fmt .Sprintf ("GetById_%d" , expectedId ), []cache_serialization.PriceDto {
@@ -88,7 +88,7 @@ func TestPlanPriceRepository(t *testing.T) {
8888 })
8989
9090 t .Run ("Create" , func (t * testing.T ) {
91- expectedPlanId := 2
91+ expectedPlanId := 4
9292 expectedCents := int64 (10_000 )
9393 expectedCurrency := "EUR"
9494
@@ -110,7 +110,7 @@ func TestPlanPriceRepository(t *testing.T) {
110110 })
111111
112112 t .Run ("Update" , func (t * testing.T ) {
113- planId := 2
113+ planId := 5
114114 cents := int64 (10_000 )
115115 currency := "EUR"
116116
@@ -120,7 +120,7 @@ func TestPlanPriceRepository(t *testing.T) {
120120 t .Fatal (priceErr )
121121 }
122122
123- newPlanId := 3
123+ newPlanId := 6
124124 newCents := int64 (80_000 )
125125 newCurrency := "AUD"
126126 updatedPricePlan := dataobjects .NewPlanPrice (priceId , newPlanId , newCents , newCurrency )
@@ -141,7 +141,7 @@ func TestPlanPriceRepository(t *testing.T) {
141141 })
142142
143143 t .Run ("Delete" , func (t * testing.T ) {
144- priceId := insertTestPlanPrice (t , db , 3 , "PLN" , 150_000 )
144+ priceId := insertTestPlanPrice (t , db , 7 , "PLN" , 150_000 )
145145 price , priceErr := planPriceRepository .GetById (priceId )
146146 if priceErr != nil {
147147 t .Fatal (priceErr )
@@ -159,7 +159,7 @@ func TestPlanPriceRepository(t *testing.T) {
159159 })
160160
161161 t .Run ("GetAllWithPlanId" , func (t * testing.T ) {
162- planId := 4
162+ planId := 8
163163
164164 fPlanId := insertTestPlanPrice (t , db , planId , "EUR" , 150_000 )
165165 fPlan := dataobjects .NewPlanPrice (fPlanId , planId , 150_000 , "EUR" )
0 commit comments