github.com/Ptt-official-app/go-bbs@v0.12.0/pttbbs/pttbbs_test.go (about)

     1  package pttbbs
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestReadUserFavoriteRecordsFileNoFile(t *testing.T) {
     8  	c := Connector{}
     9  	recs, err := c.ReadUserFavoriteRecordsFile("test/.fav")
    10  
    11  	// https://github.com/Ptt-official-app/Ptt-backend/issues/235
    12  	if err != nil || len(recs) != 0 {
    13  		t.Errorf("not return empty favorite records")
    14  	}
    15  }