mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-12 09:05:39 +00:00
Some checks failed
Build Snapshot / build-snapshot (push) Waiting to run
DevSkim / DevSkim (push) Waiting to run
Buf CI / buf (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Codestyle checks / codestyle (push) Has been cancelled
21 lines
324 B
Go
21 lines
324 B
Go
package stringvariables
|
|
|
|
import (
|
|
"github.com/stretchr/testify/assert"
|
|
"testing"
|
|
)
|
|
|
|
func TestGetAndSet(t *testing.T) {
|
|
Set("foo", "bar")
|
|
Set("salutation", "hello")
|
|
|
|
assert.Equal(t, "bar", Get("foo"))
|
|
assert.Equal(t, "", Get("not exist"))
|
|
}
|
|
|
|
func TestGetall(t *testing.T) {
|
|
ret := GetAll()
|
|
|
|
assert.NotEmpty(t, ret)
|
|
}
|