File tree Expand file tree Collapse file tree 1 file changed +102
-0
lines changed
Expand file tree Collapse file tree 1 file changed +102
-0
lines changed Original file line number Diff line number Diff line change 1+ package pulse
2+
3+ import "testing"
4+
5+ func TestRoute_Get (t * testing.T ) {
6+ router := NewRouter ()
7+
8+ app .Router = router
9+
10+ router .Get ("/users/*" , func (ctx * Context ) error {
11+ ctx .String ("hello" )
12+ return nil
13+ })
14+ }
15+
16+ func TestRoute_Post (t * testing.T ) {
17+ router := NewRouter ()
18+
19+ app .Router = router
20+
21+ router .Post ("/users/*" , func (ctx * Context ) error {
22+ ctx .String ("hello" )
23+ return nil
24+ })
25+ }
26+
27+ func TestRoute_Put (t * testing.T ) {
28+ router := NewRouter ()
29+
30+ app .Router = router
31+
32+ router .Put ("/users/*" , func (ctx * Context ) error {
33+ ctx .String ("hello" )
34+ return nil
35+ })
36+ }
37+
38+ func TestRoute_Delete (t * testing.T ) {
39+ router := NewRouter ()
40+
41+ app .Router = router
42+
43+ router .Delete ("/users/*" , func (ctx * Context ) error {
44+ ctx .String ("hello" )
45+ return nil
46+ })
47+ }
48+
49+ func TestRoute_Patch (t * testing.T ) {
50+ router := NewRouter ()
51+
52+ app .Router = router
53+
54+ router .Patch ("/users/*" , func (ctx * Context ) error {
55+ ctx .String ("hello" )
56+ return nil
57+ })
58+ }
59+
60+ func TestRoute_Head (t * testing.T ) {
61+ router := NewRouter ()
62+
63+ app .Router = router
64+
65+ router .Head ("/users/*" , func (ctx * Context ) error {
66+ ctx .String ("hello" )
67+ return nil
68+ })
69+ }
70+
71+ func TestRoute_Options (t * testing.T ) {
72+ router := NewRouter ()
73+
74+ app .Router = router
75+
76+ router .Options ("/users/*" , func (ctx * Context ) error {
77+ ctx .String ("hello" )
78+ return nil
79+ })
80+ }
81+
82+ func TestRoute_Connect (t * testing.T ) {
83+ router := NewRouter ()
84+
85+ app .Router = router
86+
87+ router .Connect ("/users/*" , func (ctx * Context ) error {
88+ ctx .String ("hello" )
89+ return nil
90+ })
91+ }
92+
93+ func TestRoute_Trace (t * testing.T ) {
94+ router := NewRouter ()
95+
96+ app .Router = router
97+
98+ router .Trace ("/users/*" , func (ctx * Context ) error {
99+ ctx .String ("hello" )
100+ return nil
101+ })
102+ }
You can’t perform that action at this time.
0 commit comments