telebot/context_test.go

19 lines
310 B
Go
Raw Normal View History

2020-06-19 19:48:05 +00:00
package telebot
2021-03-12 08:03:27 +00:00
import (
"testing"
2021-03-12 08:04:48 +00:00
"github.com/stretchr/testify/assert"
2021-03-12 08:03:27 +00:00
)
2020-06-19 19:48:05 +00:00
var _ Context = (*nativeContext)(nil)
2021-03-12 08:03:27 +00:00
2021-07-07 09:52:28 +00:00
func TestContext(t *testing.T) {
t.Run("Get,Set", func(t *testing.T) {
var c Context
c = new(nativeContext)
c.Set("name", "Jon Snow")
assert.Equal(t, "Jon Snow", c.Get("name"))
})
2021-03-12 08:03:27 +00:00
}