Skip to content

Commit 5d25674

Browse files
committed
Change test app name
1 parent afe5242 commit 5d25674

4 files changed

Lines changed: 15 additions & 15 deletions

File tree

command/record_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,14 +248,14 @@ func TestRecordApp(t *testing.T) {
248248
ui := new(cli.MockUi)
249249
c := RecordCmd{UI: ui}
250250

251-
args := []string{"-app", "chrome"}
251+
args := []string{"-app", "browser"}
252252
rc := c.Run(args)
253253

254254
if rc != 0 {
255255
t.Errorf("gtm record(%+v), want 0 got %d, %s", args, rc, ui.ErrorWriter)
256256
}
257257

258-
if _, err := os.Stat(filepath.Join(workdir, ".gtm/chrome.app")); os.IsNotExist(err) {
258+
if _, err := os.Stat(filepath.Join(workdir, ".gtm/browser.app")); os.IsNotExist(err) {
259259
t.Errorf("gtm record(%+v), want .app file to be created, it was not created", args)
260260
}
261261

command/report_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ func TestReportAppsOff(t *testing.T) {
264264
(InitCmd{UI: new(cli.MockUi)}).Run([]string{})
265265

266266
repo.SaveFile("event.go", "event", "")
267-
repo.SaveFile("chrome.app", project.GTMDir, "")
267+
repo.SaveFile("browser.app", project.GTMDir, "")
268268
repo.SaveFile("1458496803.event", project.GTMDir, filepath.Join("event", "event.go"))
269-
repo.SaveFile("1458496818.event", project.GTMDir, filepath.Join(project.GTMDir, "chrome.app"))
269+
repo.SaveFile("1458496818.event", project.GTMDir, filepath.Join(project.GTMDir, "browser.app"))
270270

271271
repo.Commit(repo.Stage(filepath.Join("event", "event.go")))
272272

@@ -282,8 +282,8 @@ func TestReportAppsOff(t *testing.T) {
282282
if rc != 0 {
283283
t.Errorf("gtm report(%+v), want 0 got %d, %s", args, rc, ui.ErrorWriter.String())
284284
}
285-
if !strings.Contains(ui.OutputWriter.String(), "Chrome") {
286-
t.Errorf("gtm report(%+v), want 'Chrome' got %s, %s", args, ui.OutputWriter.String(), ui.ErrorWriter.String())
285+
if !strings.Contains(ui.OutputWriter.String(), "Browser") {
286+
t.Errorf("gtm report(%+v), want 'Browser' got %s, %s", args, ui.OutputWriter.String(), ui.ErrorWriter.String())
287287
}
288288

289289
// Excluding apps
@@ -294,8 +294,8 @@ func TestReportAppsOff(t *testing.T) {
294294
if rc != 0 {
295295
t.Errorf("gtm report(%+v), want 0 got %d, %s", args, rc, ui.ErrorWriter.String())
296296
}
297-
if strings.Contains(ui.OutputWriter.String(), "Chrome") {
298-
t.Errorf("gtm report(%+v), want not 'Chrome' got %s, %s", args, ui.OutputWriter.String(), ui.ErrorWriter.String())
297+
if strings.Contains(ui.OutputWriter.String(), "Browser") {
298+
t.Errorf("gtm report(%+v), want not 'Browser' got %s, %s", args, ui.OutputWriter.String(), ui.ErrorWriter.String())
299299
}
300300
}
301301

command/status_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ func TestStatusAppOff(t *testing.T) {
5959
repo.Seed()
6060
os.Chdir(repo.Workdir())
6161

62-
repo.SaveFile("chrome.app", project.GTMDir, "")
62+
repo.SaveFile("browser.app", project.GTMDir, "")
6363
repo.SaveFile("1458496803.event", project.GTMDir, filepath.Join("event", "event.go"))
64-
repo.SaveFile("1458497804.event", project.GTMDir, filepath.Join(project.GTMDir, "chrome.app"))
64+
repo.SaveFile("1458497804.event", project.GTMDir, filepath.Join(project.GTMDir, "browser.app"))
6565

6666
(InitCmd{UI: new(cli.MockUi)}).Run([]string{})
6767

@@ -74,8 +74,8 @@ func TestStatusAppOff(t *testing.T) {
7474
if rc != 0 {
7575
t.Errorf("gtm status(%+v), want 0 got %d, %s", args, rc, ui.ErrorWriter.String())
7676
}
77-
if !strings.Contains(ui.OutputWriter.String(), "event.go") || !strings.Contains(ui.OutputWriter.String(), "Chrome") {
78-
t.Errorf("gtm status(%+v), want 'event.go' and 'Chrome' got %s", args, ui.OutputWriter.String())
77+
if !strings.Contains(ui.OutputWriter.String(), "event.go") || !strings.Contains(ui.OutputWriter.String(), "Browser") {
78+
t.Errorf("gtm status(%+v), want 'event.go' and 'Browser' got %s", args, ui.OutputWriter.String())
7979
}
8080
ui.OutputWriter.Reset()
8181

@@ -85,8 +85,8 @@ func TestStatusAppOff(t *testing.T) {
8585
if rc != 0 {
8686
t.Errorf("gtm status(%+v), want 0 got %d, %s", args, rc, ui.ErrorWriter.String())
8787
}
88-
if !strings.Contains(ui.OutputWriter.String(), "event.go") || strings.Contains(ui.OutputWriter.String(), "Chrome") {
89-
t.Errorf("gtm status(%+v), want 'event.go' and not 'Chrome' got %s", args, ui.OutputWriter.String())
88+
if !strings.Contains(ui.OutputWriter.String(), "event.go") || strings.Contains(ui.OutputWriter.String(), "Browser") {
89+
t.Errorf("gtm status(%+v), want 'event.go' and not 'Browser' got %s", args, ui.OutputWriter.String())
9090
}
9191
}
9292

project/project_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ func TestClean(t *testing.T) {
266266
}
267267

268268
// write an app event file
269-
if err := ioutil.WriteFile(filepath.Join(gtmPath, "app.event"), []byte(".gtm/chrome.app"), 0644); err != nil {
269+
if err := ioutil.WriteFile(filepath.Join(gtmPath, "app.event"), []byte(".gtm/browser.app"), 0644); err != nil {
270270
t.Errorf("Want error nil got %s", err)
271271
}
272272

0 commit comments

Comments
 (0)