sort imports

This commit is contained in:
Umputun
2018-02-02 19:55:33 -06:00
parent e37e7b5bd5
commit a08fcc9a6a
5 changed files with 9 additions and 7 deletions
+1
View File
@@ -7,6 +7,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/umputun/remark/app/store"
)
+1 -1
View File
@@ -9,8 +9,8 @@ import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/umputun/remark/app/store"
)
+3 -3
View File
@@ -2,18 +2,18 @@ package auth
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"strings"
"testing"
"fmt"
"github.com/gorilla/sessions"
"github.com/stretchr/testify/assert"
"github.com/umputun/remark/app/store"
"golang.org/x/oauth2"
"github.com/umputun/remark/app/store"
)
func TestAuth(t *testing.T) {
+1
View File
@@ -8,6 +8,7 @@ import (
"time"
"github.com/stretchr/testify/assert"
"github.com/umputun/remark/app/store"
)
+3 -3
View File
@@ -17,12 +17,12 @@ func TestService_Vote(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, 2, len(res))
assert.Equal(t, 0, res[0].Score)
assert.Equal(t, map[string]bool{}, res[0].Votes)
assert.Equal(t, map[string]bool{}, res[0].Votes, "no votes initially")
c, err := b.Vote(Locator{URL: "https://radio-t.com", SiteID: "radio-t"}, res[0].ID, "user1", true)
assert.Nil(t, err)
assert.Equal(t, 1, c.Score)
assert.Equal(t, map[string]bool{"user1": true}, c.Votes)
assert.Equal(t, map[string]bool{"user1": true}, c.Votes, "user voted +")
_, err = b.Vote(Locator{URL: "https://radio-t.com", SiteID: "radio-t"}, res[0].ID, "user1", true)
assert.NotNil(t, err, "double-voting rejected")
@@ -38,7 +38,7 @@ func TestService_Vote(t *testing.T) {
assert.Nil(t, err)
assert.Equal(t, 2, len(res))
assert.Equal(t, 0, res[0].Score)
assert.Equal(t, map[string]bool{}, res[0].Votes)
assert.Equal(t, map[string]bool{}, res[0].Votes, "vote reset ok")
}
func TestBoltDB_Pin(t *testing.T) {