Archived
1
0
Fork 0

Remove useless comment in Twitter tests

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2021-03-02 09:01:18 +01:00
parent 9692da6852
commit 443fbd9106
No known key found for this signature in database
GPG key ID: FF42D23B580C89F7

View file

@ -80,24 +80,6 @@ func TestFormatPrice(t *testing.T) {
}
}
/*
func formatAvailableTweet(shopName string, productName string, productPrice float64, productCurrency string, productURL string, hashtags string) string {
// format message
formattedPrice := formatPrice(productPrice, productCurrency)
message := fmt.Sprintf("%s: %s for %s is available at %s %s", shopName, productName, formattedPrice, productURL, hashtags)
// truncate tweet if too big
if utf8.RuneCountInString(message) > tweetMaxSize {
// maximum tweet size - other characters - additional "…" to say product name has been truncated
productNameSize := tweetMaxSize - utf8.RuneCountInString(fmt.Sprintf("%s: for %s is available at %s %s", shopName, formattedPrice, productURL, hashtags)) - 1
format := fmt.Sprintf("%%s: %%.%ds… for %%s is available at %%s %%s", productNameSize)
message = fmt.Sprintf(format, shopName, productName, formattedPrice, productURL, hashtags)
}
return message
}
*/
func TestFormatAvailableTweet(t *testing.T) {
tests := []struct {
shopName string