github.com/decred/politeia@v1.4.0/politeiawww/api/www/v1/v1_test.go (about) 1 // Copyright (c) 2021 The Decred developers 2 // Use of this source code is governed by an ISC license that can be found in 3 // the LICENSE file. 4 5 package v1 6 7 import ( 8 "testing" 9 10 "github.com/decred/politeia/util/unittest" 11 ) 12 13 func TestMaps(t *testing.T) { 14 err := unittest.TestGenericConstMap(ErrorStatus, uint64(ErrorStatusLast)) 15 if err != nil { 16 t.Fatalf("ErrorStatus: %v", err) 17 } 18 err = unittest.TestGenericConstMap(PropStatus, uint64(PropStatusLast)) 19 if err != nil { 20 t.Fatalf("PropStatus: %v", err) 21 } 22 err = unittest.TestGenericConstMap(PropVoteStatus, uint64(PropVoteLast)) 23 if err != nil { 24 t.Fatalf("PropVoteStatus: %v", err) 25 } 26 err = unittest.TestGenericConstMap(UserManageAction, uint64(UserManageLast)) 27 if err != nil { 28 t.Fatalf("UserManageAction: %v", err) 29 } 30 }