Revert "feat(loyalty): EnakPoint & EnakCoin" (#32)
This reverts merge commit645da30, returning main tof0ff59f. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
645da3048e
commit
4e24f9bbb0
@@ -1,14 +1,11 @@
|
||||
package transformer
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"apskel-pos-be/internal/contract"
|
||||
"apskel-pos-be/internal/models"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -49,14 +46,3 @@ func TestAddToOrderContractToModelCarriesWeight(t *testing.T) {
|
||||
require.NotNil(t, result.OrderItems[0].Weight)
|
||||
require.Equal(t, weight, *result.OrderItems[0].Weight)
|
||||
}
|
||||
|
||||
func TestOrderModelToContractCarriesEarnings(t *testing.T) {
|
||||
got := OrderModelToContract(&models.OrderResponse{PointsEarned: 875, CoinsEarned: 3})
|
||||
assert.Equal(t, int64(875), got.PointsEarned)
|
||||
assert.Equal(t, int64(3), got.CoinsEarned)
|
||||
|
||||
body, err := json.Marshal(OrderModelToContract(&models.OrderResponse{}))
|
||||
assert.NoError(t, err)
|
||||
assert.Contains(t, string(body), `"points_earned":0`, "present as 0 when nothing was earned")
|
||||
assert.Contains(t, string(body), `"coins_earned":0`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user