github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/cmd/juju/common/gui_test.go (about)

     1  // Copyright 2016 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package common_test
     5  
     6  import (
     7  	gc "gopkg.in/check.v1"
     8  
     9  	"github.com/juju/juju/cmd/juju/common"
    10  	"github.com/juju/juju/environs/gui"
    11  	"github.com/juju/juju/testing"
    12  )
    13  
    14  type guiSuite struct {
    15  	testing.BaseSuite
    16  }
    17  
    18  var _ = gc.Suite(&guiSuite{})
    19  
    20  func (s *guiSuite) TestGUIDataSourceBaseURL(c *gc.C) {
    21  	c.Assert(common.GUIDataSourceBaseURL(), gc.Equals, gui.DefaultBaseURL)
    22  	url := "https://1.2.3.4/streams/gui"
    23  	s.PatchEnvironment("JUJU_GUI_SIMPLESTREAMS_URL", url)
    24  	c.Assert(common.GUIDataSourceBaseURL(), gc.Equals, url)
    25  }