Skip to content

Commit a4003b7

Browse files
Add tests for the changes
1 parent 1de6641 commit a4003b7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: commands/core/search_test.go

+11
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ func TestPlatformSearch(t *testing.T) {
6262
6363
Boards: []*rpc.Board{{Name: "RK002"}},
6464
Type: []string{"Contributed"},
65+
Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"},
6566
})
6667
require.Contains(t, res.SearchOutput, &rpc.Platform{
6768
Id: "Retrokits-RK002:arm",
@@ -73,6 +74,7 @@ func TestPlatformSearch(t *testing.T) {
7374
7475
Boards: []*rpc.Board{{Name: "RK002"}},
7576
Type: []string{"Contributed"},
77+
Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"},
7678
})
7779

7880
res, stat = PlatformSearch(&rpc.PlatformSearchRequest{
@@ -93,6 +95,7 @@ func TestPlatformSearch(t *testing.T) {
9395
9496
Boards: []*rpc.Board{{Name: "RK002"}},
9597
Type: []string{"Contributed"},
98+
Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"},
9699
})
97100

98101
// Search the Package Maintainer
@@ -114,6 +117,7 @@ func TestPlatformSearch(t *testing.T) {
114117
115118
Boards: []*rpc.Board{{Name: "RK002"}},
116119
Type: []string{"Contributed"},
120+
Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"},
117121
})
118122
require.Contains(t, res.SearchOutput, &rpc.Platform{
119123
Id: "Retrokits-RK002:arm",
@@ -125,6 +129,7 @@ func TestPlatformSearch(t *testing.T) {
125129
126130
Boards: []*rpc.Board{{Name: "RK002"}},
127131
Type: []string{"Contributed"},
132+
Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"},
128133
})
129134

130135
// Search using the Package name
@@ -146,6 +151,7 @@ func TestPlatformSearch(t *testing.T) {
146151
147152
Boards: []*rpc.Board{{Name: "RK002"}},
148153
Type: []string{"Contributed"},
154+
Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"},
149155
})
150156
require.Contains(t, res.SearchOutput, &rpc.Platform{
151157
Id: "Retrokits-RK002:arm",
@@ -157,6 +163,7 @@ func TestPlatformSearch(t *testing.T) {
157163
158164
Boards: []*rpc.Board{{Name: "RK002"}},
159165
Type: []string{"Contributed"},
166+
Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"},
160167
})
161168

162169
// Search using the Platform name
@@ -178,6 +185,7 @@ func TestPlatformSearch(t *testing.T) {
178185
179186
Boards: []*rpc.Board{{Name: "RK002"}},
180187
Type: []string{"Contributed"},
188+
Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"},
181189
})
182190
require.Contains(t, res.SearchOutput, &rpc.Platform{
183191
Id: "Retrokits-RK002:arm",
@@ -189,6 +197,7 @@ func TestPlatformSearch(t *testing.T) {
189197
190198
Boards: []*rpc.Board{{Name: "RK002"}},
191199
Type: []string{"Contributed"},
200+
Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"},
192201
})
193202

194203
// Search using a board name
@@ -237,6 +246,7 @@ func TestPlatformSearch(t *testing.T) {
237246
{Name: "Arduino Industrial 101"},
238247
{Name: "Linino One"},
239248
},
249+
Help: &rpc.HelpResources{Online: "http://www.arduino.cc/en/Reference/HomePage"},
240250
})
241251

242252
res, stat = PlatformSearch(&rpc.PlatformSearchRequest{
@@ -284,6 +294,7 @@ func TestPlatformSearch(t *testing.T) {
284294
{Name: "Arduino Industrial 101"},
285295
{Name: "Linino One"},
286296
},
297+
Help: &rpc.HelpResources{Online: "http://www.arduino.cc/en/Reference/HomePage"},
287298
})
288299
}
289300

0 commit comments

Comments
 (0)