package activityapi

import "testing"

func TestWheelPrizeDisplayValueUsesMetadataPrice(t *testing.T) {
	metadata := `{"display_value":1314,"coin_price":1314}`

	if got := wheelPrizeDisplayValue(0, 0, 1, metadata); got != 1314 {
		t.Fatalf("prop display value should use metadata price, got %d", got)
	}
}

func TestWheelPrizeDisplayValueKeepsCoinAmountFirst(t *testing.T) {
	metadata := `{"display_value":1314,"coin_price":1314}`

	if got := wheelPrizeDisplayValue(99, 0, 1, metadata); got != 99 {
		t.Fatalf("coin display value should use reward coins first, got %d", got)
	}
}
