diff --git a/ipe/connection.go b/ipe/connection.go index 9d48463..fe904cf 100644 --- a/ipe/connection.go +++ b/ipe/connection.go @@ -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 diff --git a/ipe/connection_test.go b/ipe/connection_test.go index 3d0f058..d691ecc 100644 --- a/ipe/connection_test.go +++ b/ipe/connection_test.go @@ -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{}