diff options
| author | Shulhan <ms@kilabit.info> | 2024-04-17 23:51:53 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-04-18 00:41:07 +0700 |
| commit | a28f1684d9b427149f7a8f03f865bdf57eafc08e (patch) | |
| tree | a9b9244afedef99490d453672dc8b56e662f90bf /api_client_test.go | |
| parent | 51d14a2686c8ec0dbd876312dd76eec54df0d617 (diff) | |
| download | kamusku-a28f1684d9b427149f7a8f03f865bdf57eafc08e.tar.xz | |
all: rename the module to "kamusku"
Diffstat (limited to 'api_client_test.go')
| -rw-r--r-- | api_client_test.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/api_client_test.go b/api_client_test.go index 6554660..a56175c 100644 --- a/api_client_test.go +++ b/api_client_test.go @@ -1,12 +1,12 @@ // SPDX-FileCopyrightText: 2020 M. Shulhan <ms@kilabit.info> // SPDX-License-Identifier: GPL-3.0-or-later -package kamusd +package kamusku import ( "testing" - "git.sr.ht/~shulhan/kamusku" + "git.sr.ht/~shulhan/kbbi" "git.sr.ht/~shulhan/pakakeh.go/lib/test" ) @@ -18,7 +18,7 @@ func TestApiClient_Lookup_offline(t *testing.T) { cases := []struct { desc string words []string - exp kamusku.LookupResponse + exp kbbi.LookupResponse expError string }{{ desc: "With empty input", @@ -28,13 +28,13 @@ func TestApiClient_Lookup_offline(t *testing.T) { }, { desc: "With valid word in cache", words: []string{"mengeja"}, - exp: kamusku.LookupResponse{ + exp: kbbi.LookupResponse{ "mengeja": testKataMengeja, }, }, { desc: "With duplicate words", words: []string{"mengeja", "mengeja"}, - exp: kamusku.LookupResponse{ + exp: kbbi.LookupResponse{ "mengeja": testKataMengeja, }, }} @@ -48,7 +48,7 @@ func TestApiClient_Lookup_offline(t *testing.T) { continue } - test.Assert(t, `kamusku.LookupResponse`, c.exp, got) + test.Assert(t, `kbbi.LookupResponse`, c.exp, got) } } @@ -62,29 +62,29 @@ func TestApiClient_Lookup_online(t *testing.T) { cases := []struct { desc string words []string - exp kamusku.LookupResponse + exp kbbi.LookupResponse expError string }{{ desc: "With empty input", }, { desc: "With valid word in cache", words: []string{"mengeja"}, - exp: kamusku.LookupResponse{ + exp: kbbi.LookupResponse{ "mengeja": testKataMengeja, }, }, { desc: "With duplicate words", words: []string{"mengeja", "mengeja"}, - exp: kamusku.LookupResponse{ + exp: kbbi.LookupResponse{ "mengeja": testKataMengeja, }, }, { desc: "With one of the word not in cache", words: []string{"mengeja", "eja"}, - exp: kamusku.LookupResponse{ - "mengeja": testKataMengeja, - "eja": &kamusku.Word{ - Definition: []*kamusku.WordDefinition{{ + exp: kbbi.LookupResponse{ + `mengeja`: testKataMengeja, + `eja`: &kbbi.Word{ + Definition: []*kbbi.WordDefinition{{ Value: "lafal huruf satu demi satu", Classes: []string{"Verba: kata kerja"}, }}, |
