explore_test.go 707 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package view
  2. import (
  3. "testing"
  4. "github.com/metarare/metarare_api/common"
  5. )
  6. func Test_Explore(t *testing.T) {
  7. _db := initDB()
  8. _f := common.Filter{
  9. // CollectionName: "컬렉션1",
  10. CurrencyAmountStart: "20",
  11. CurrencyAmountEnd: "40",
  12. Currency: "eth",
  13. SaleType: "fixed",
  14. }
  15. err, selectedItems := SelectExploreItems(_db, _f, 10000)
  16. if err != nil {
  17. t.Error("NO Selected column")
  18. }
  19. t.Logf("tokens : %+v", selectedItems)
  20. }
  21. func Test_CollectionSearch(t *testing.T) {
  22. _db := initDB()
  23. _f := common.Filter{}
  24. err, selectedItems := SelectCollectionListByKeyword(_db, _f)
  25. if err != nil {
  26. t.Error("NO Selected column")
  27. }
  28. t.Logf("tokens : %+v", selectedItems)
  29. }