Initial commit
Includes: SCG parser MTG cards search
This commit is contained in:
commit
1af9226764
8 changed files with 181 additions and 0 deletions
21
cardsinfo/internals_test.go
Normal file
21
cardsinfo/internals_test.go
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
package cardsinfo
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestFetchPriceOne(t *testing.T) {
|
||||
price, _ := fetchPrice("$2.28")
|
||||
assert.Equal(t, 2.28, price)
|
||||
}
|
||||
|
||||
func TestFetchPriceTwo(t *testing.T) {
|
||||
price, _ := fetchPrice("$2.28$1.14")
|
||||
assert.Equal(t, 2.28, price)
|
||||
}
|
||||
|
||||
func TestFetchPriceNo(t *testing.T) {
|
||||
_, err := fetchPrice("")
|
||||
assert.NotNil(t, err)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue