model_test.go 421 B

123456789101112131415161718192021222324
  1. package model
  2. import (
  3. "testing"
  4. . "github.com/smartystreets/goconvey/convey"
  5. )
  6. func TestElecUserSetting(t *testing.T) {
  7. Convey("", t, func() {
  8. data := &DBOldElecUserSetting{
  9. MID: 46333,
  10. SettingID: 1,
  11. Status: 1,
  12. }
  13. So(data.BitValue(), ShouldEqual, 0x01)
  14. data = &DBOldElecUserSetting{
  15. MID: 46333,
  16. SettingID: 2,
  17. Status: 1,
  18. }
  19. So(data.BitValue(), ShouldEqual, 0x02)
  20. })
  21. }