1
// Copyright 2012, 2013 Canonical Ltd.
2
// Licensed under the AGPLv3, see LICENCE file for details.
7
jc "github.com/juju/testing/checkers"
9
"gopkg.in/juju/charm.v6-unstable"
12
type RelationSuite struct{}
14
var _ = gc.Suite(&RelationSuite{})
16
// TestRelatedEndpoints verifies the behaviour of RelatedEndpoints in
17
// multi-endpoint peer relations, which are currently not constructable
19
func (s *RelationSuite) TestRelatedEndpoints(c *gc.C) {
20
rel := charm.Relation{
24
Scope: charm.ScopeGlobal,
27
ApplicationName: "jeff",
30
ApplicationName: "mike",
33
ApplicationName: "mike",
36
r := &Relation{nil, relationDoc{Endpoints: eps}}
37
relatedEps, err := r.RelatedEndpoints("mike")
38
c.Assert(err, jc.ErrorIsNil)
39
c.Assert(relatedEps, gc.DeepEquals, eps)