-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add FindCurrentGate (and related) methods
- Loading branch information
thisisaaronland
committed
Sep 30, 2021
1 parent
1036c96
commit 0373b45
Showing
2 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package gates | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
) | ||
|
||
func TestFindCurrentGate(t *testing.T) { | ||
|
||
tests := map[string]int64{ | ||
"A9": 1745882385, | ||
} | ||
|
||
ctx := context.Background() | ||
|
||
for code, id := range tests { | ||
|
||
g, err := FindCurrentGate(ctx, code) | ||
|
||
if err != nil { | ||
t.Fatalf("Failed to find current gate for %s, %v", code, err) | ||
} | ||
|
||
if g.WhosOnFirstId != id { | ||
t.Fatalf("Unexpected ID for gate %s. Got %d but expected %d", code, g.WhosOnFirstId, id) | ||
} | ||
} | ||
} |