Fixed SCG prices

This commit is contained in:
Artyom Belousov 2020-09-22 10:22:26 +03:00
parent 631213a412
commit 3919b21318
8 changed files with 51 additions and 199 deletions

View file

@ -10,13 +10,13 @@ func TestFormat(t *testing.T) {
data := []cardsinfo.CardPrice{
{
Name: "Green lotus",
Price: 22.8,
Price: "22.8",
Link: "scg.com/1",
Edition: "alpha",
},
{
Name: "White lotus",
Price: 3.22,
Price: "3.22",
Link: "scg.com/2",
Edition: "gamma",
},

View file

@ -1,13 +1,15 @@
package tests
import (
"fmt"
"github.com/flygrounder/go-mtg-vk/cardsinfo"
"github.com/stretchr/testify/assert"
"testing"
)
func TestParser(t *testing.T) {
prices, err := cardsinfo.GetSCGPrices("shock")
prices, err := cardsinfo.GetPrices("shock")
assert.Nil(t, err)
assert.NotEmpty(t, prices)
fmt.Println(prices)
}