Path: blob/main/integration/other_components/cmd_message_test.go
1007 views
//go:build !relayer12package other_components_test34import (5"testing"67envtest "github.com/ignite/cli/v29/integration"8)910func TestGenerateAnAppWithMessage(t *testing.T) {11var (12env = envtest.New(t)13app = env.ScaffoldApp("github.com/test/blog")14)1516app.Scaffold(17"create a message",18false,19"message",20"do-foo",21"text",22"vote:int",23"like:bool",24"from:address",25"-r",26"foo,bar:int,foobar:bool",27)2829app.Scaffold(30"create a message with custom path",31false,32"message",33"app-path",34"text",35"vote:int",36"like:bool",37"-r",38"foo,bar:int,foobar:bool",39"--path",40"blog",41"--no-simulation",42)4344app.Scaffold(45"should prevent creating an existing message",46true,47"message", "do-foo", "bar",48)4950app.Scaffold(51"should prevent creating a message whose name only differs in capitalization",52true,53"message", "do-Foo", "bar",54)5556app.Scaffold(57"create a message with a custom signer name",58false,59"message", "--yes", "do-bar", "bar", "--signer", "bar-doer",60)6162app.Scaffold(63"create a custom field type",64false,65"type",66"custom-type",67"numInt:int",68"numsInt:array.int",69"numsIntAlias:ints",70"numUint:uint",71"numsUint:array.uint",72"numsUintAlias:uints",73"textString:string",74"textStrings:array.string",75"textStringsAlias:strings",76"textCoin:coin",77"textCoins:array.coin",78)7980app.Scaffold(81"create a message with the custom field type",82false,83"message", "foo-baz", "customField:CustomType", "textCoinsAlias:coins",84)8586app.Scaffold(87"create a module",88false,89"module", "foo", "--require-registration",90)9192app.Scaffold(93"create a message in a module",94false,95"message",96"do-foo",97"text",98"userIds:array.uint",99"--module",100"foo",101"--desc",102"foo bar foobar",103"--response",104"foo,bar:int,foobar:bool",105)106107app.EnsureSteady()108}109110111