Moved location of mockSocket
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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{}
|
||||
|
||||
Reference in New Issue
Block a user