@@ -20,7 +20,7 @@ func TestMainService(t *testing.T) {
20
20
CS := CommandService {discordMessage : fixtures .HelloCommand }
21
21
w := httptest .NewRecorder ()
22
22
r , _ := http .NewRequest ("GET" , "/" , nil )
23
- CS .MainService (w , r )
23
+ CS .HandleMessage (w , r )
24
24
25
25
assert .Equal (t , http .StatusOK , w .Code )
26
26
})
@@ -44,7 +44,7 @@ func TestMainService(t *testing.T) {
44
44
CS := CommandService {discordMessage : discordMessage }
45
45
w := httptest .NewRecorder ()
46
46
r , _ := http .NewRequest ("GET" , "/" , nil )
47
- CS .MainService (w , r )
47
+ CS .HandleMessage (w , r )
48
48
messageResponse := discordgo.InteractionResponse {}
49
49
err := json .Unmarshal (w .Body .Bytes (), & messageResponse )
50
50
assert .NoError (t , err )
@@ -65,7 +65,7 @@ func TestMainService(t *testing.T) {
65
65
CS := CommandService {discordMessage : discordMessage }
66
66
w := httptest .NewRecorder ()
67
67
r , _ := http .NewRequest ("GET" , "/" , nil )
68
- CS .MainService (w , r )
68
+ CS .HandleMessage (w , r )
69
69
messageResponse := discordgo.InteractionResponse {}
70
70
err := json .Unmarshal (w .Body .Bytes (), & messageResponse )
71
71
assert .NoError (t , err )
@@ -87,7 +87,7 @@ func TestMainService(t *testing.T) {
87
87
88
88
w := httptest .NewRecorder ()
89
89
r , _ := http .NewRequest ("GET" , "/" , nil )
90
- CS .MainService (w , r )
90
+ CS .HandleMessage (w , r )
91
91
92
92
assert .Equal (t , http .StatusBadRequest , w .Code )
93
93
})
0 commit comments