Moved location of mockSocket

This commit is contained in:
claudemiro
2016-08-10 20:26:27 -03:00
parent 0c599ea5fb
commit 6e46bcb2aa
2 changed files with 8 additions and 8 deletions
-8
View File
@@ -15,14 +15,6 @@ type socket interface {
WriteJSON(interface{}) error
}
// mockSocket is a mock implementation of socket
// used in the test suite
type mockSocket struct{}
func (s mockSocket) WriteJSON(i interface{}) error {
return nil
}
// An User Connection
type connection struct {
SocketID string
+8
View File
@@ -6,6 +6,14 @@ package ipe
import "testing"
// mockSocket is a mock implementation of socket
// used in the test suite
type mockSocket struct{}
func (s mockSocket) WriteJSON(i interface{}) error {
return nil
}
func TestNewConnection(t *testing.T) {
expectedSocketID := "socketID"
expectedSocket := mockSocket{}