@@ -20,13 +20,16 @@ func TestWorkspacePotentialExercises(t *testing.T) {
20
20
b1 := filepath .Join (tmpDir , "track-b" , "exercise-one" )
21
21
b2 := filepath .Join (tmpDir , "track-b" , "exercise-two" )
22
22
23
+ // It should find teams exercises
24
+ team := filepath .Join (tmpDir , "teams" , "some-team" , "track-c" , "exercise-one" )
25
+
23
26
// It should ignore other people's exercises.
24
27
alice := filepath .Join (tmpDir , "users" , "alice" , "track-a" , "exercise-one" )
25
28
26
29
// It should ignore nested dirs within exercises.
27
30
nested := filepath .Join (a1 , "subdir" , "deeper-dir" , "another-deep-dir" )
28
31
29
- for _ , path := range []string {a1 , b1 , b2 , alice , nested } {
32
+ for _ , path := range []string {a1 , b1 , b2 , team , alice , nested } {
30
33
err := os .MkdirAll (path , os .FileMode (0755 ))
31
34
assert .NoError (t , err )
32
35
}
@@ -36,7 +39,7 @@ func TestWorkspacePotentialExercises(t *testing.T) {
36
39
37
40
exercises , err := ws .PotentialExercises ()
38
41
assert .NoError (t , err )
39
- if assert .Equal (t , 3 , len (exercises )) {
42
+ if assert .Equal (t , 4 , len (exercises )) {
40
43
paths := make ([]string , len (exercises ))
41
44
for i , e := range exercises {
42
45
paths [i ] = e .Path ()
@@ -46,6 +49,7 @@ func TestWorkspacePotentialExercises(t *testing.T) {
46
49
assert .Equal (t , paths [0 ], "track-a/exercise-one" )
47
50
assert .Equal (t , paths [1 ], "track-b/exercise-one" )
48
51
assert .Equal (t , paths [2 ], "track-b/exercise-two" )
52
+ assert .Equal (t , paths [3 ], "track-c/exercise-one" )
49
53
}
50
54
}
51
55
0 commit comments