~ps-jenkins/ubuntu-push/ubuntu-vivid-proposed

« back to all changes in this revision

Viewing changes to click/click_test.go

  • Committer: Roberto Alsina
  • Date: 2014-10-24 14:05:51 UTC
  • mfrom: (91.179.41 automatic)
  • mto: This revision was merged to the branch mainline in revision 136.
  • Revision ID: roberto.alsina@canonical.com-20141024140551-tsdz3xggo2rbwlqj
MergeĀ fromĀ automatic

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
        "testing"
23
23
 
24
24
        . "launchpad.net/gocheck"
 
25
 
 
26
        "launchpad.net/ubuntu-push/click/cappinfo"
25
27
)
26
28
 
27
29
func TestClick(t *testing.T) { TestingT(t) }
200
202
        c.Assert(err, IsNil)
201
203
        c.Check(app.SymbolicIcon(), Equals, "xyzzy")
202
204
}
 
205
 
 
206
func (s *clickSuite) TestSymbolicFromDesktopFile(c *C) {
 
207
        orig := cappinfo.AppSymbolicIconFromDesktopId
 
208
        cappinfo.AppSymbolicIconFromDesktopId = func(desktopId string) string {
 
209
                return "/foo/symbolic"
 
210
        }
 
211
        defer func() {
 
212
                cappinfo.AppSymbolicIconFromDesktopId = orig
 
213
        }()
 
214
        app, _ := ParseAppId("com.ubuntu.clock_clock_1.2")
 
215
        c.Check(app.SymbolicIcon(), Equals, "/foo/symbolic")
 
216
}