Fixed SCG prices
This commit is contained in:
parent
631213a412
commit
3919b21318
8 changed files with 51 additions and 199 deletions
|
|
@ -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",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue