Example #1
0
			Ω(resErr).ShouldNot(HaveOccurred())
			expected := rsapi.ApiParams{
				"val": []interface{}{
					rsapi.ApiParams{"a": "foo", "b": "bar"},
					rsapi.ApiParams{"b": "baz"},
				},
			}
			Ω(res).Should(Equal(expected))
		})
	})
})

var _ = Describe("ParseCommand", func() {
	var cmd, hrefPrefix string
	var values rsapi.ActionCommands
	var api *rsapi.Api

	var parsed *rsapi.ParsedCommand
	var parseErr error

	BeforeEach(func() {
		values = nil
		ssm := ssm.New("", nil)
		api = ssm.Api
	})

	JustBeforeEach(func() {
		parsed, parseErr = api.ParseCommand(cmd, hrefPrefix, values)
	})

	Describe("with array of maps with one element", func() {
Example #2
0
File: rl10.go Project: dylanmei/rsc
// Wrap generic client into RL10 client
func fromApi(api *rsapi.Api) *Api {
	api.Metadata = GenMetadata
	return &Api{api}
}