From 6e46bcb2aaf67fbcc54da4a3ba9dbf419507d2ef Mon Sep 17 00:00:00 2001 From: claudemiro Date: Wed, 10 Aug 2016 20:26:27 -0300 Subject: [PATCH] Moved location of mockSocket --- ipe/connection.go | 8 -------- ipe/connection_test.go | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) 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{}