-
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.
feat: added is ok method for OSRM responses (#4)
* chore: bump go version * ci: added go1.21 to the test pipeline * feat: added is ok method for OSRM responses --------- Co-authored-by: Mojtaba Arezoomand <[email protected]>
- Loading branch information
1 parent
426a192
commit 662c7e5
Showing
4 changed files
with
23 additions
and
3 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/mojixcoder/gosrm | ||
|
||
go 1.20 | ||
go 1.21 | ||
|
||
require github.com/stretchr/testify v1.8.2 | ||
|
||
|
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,15 @@ | ||
package gosrm | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestResponse_IsOk(t *testing.T) { | ||
res := Response{Code: CodeOK} | ||
assert.True(t, res.IsOk()) | ||
|
||
res.Code = CodeInvalidQuery | ||
assert.False(t, res.IsOk()) | ||
} |