summaryrefslogtreecommitdiffstats
path: root/api/web_socket_test.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-07-08 11:50:10 -0400
committerChristopher Speller <crspeller@gmail.com>2015-07-20 17:45:23 -0400
commitc6fb95912bb481791c1ca370a46a4da9c05d05ad (patch)
treebb33ff7b494b45c9d95c15f290d97914e911ce91 /api/web_socket_test.go
parenta1876cf6cc827743d8687a9113b727ef7190f452 (diff)
downloadchat-c6fb95912bb481791c1ca370a46a4da9c05d05ad.tar.gz
chat-c6fb95912bb481791c1ca370a46a4da9c05d05ad.tar.bz2
chat-c6fb95912bb481791c1ca370a46a4da9c05d05ad.zip
Changing the way we mattermost handles URLs. team.domain.com becomes domain.com/team.
Renaming team.Name to team.DisplayName and team.Domain to team.Name. So: team.Name -> url safe name. team.DisplayName -> nice name for users
Diffstat (limited to 'api/web_socket_test.go')
-rw-r--r--api/web_socket_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/api/web_socket_test.go b/api/web_socket_test.go
index 07fdfea36..161274ff7 100644
--- a/api/web_socket_test.go
+++ b/api/web_socket_test.go
@@ -17,13 +17,13 @@ func TestSocket(t *testing.T) {
Setup()
url := "ws://localhost:" + utils.Cfg.ServiceSettings.Port + "/api/v1/websocket"
- team := &model.Team{Name: "Name", Domain: "z-z-" + model.NewId() + "a", Email: "test@nowhere.com", Type: model.TEAM_OPEN}
+ team := &model.Team{DisplayName: "Name", Name: "z-z-" + model.NewId() + "a", Email: "test@nowhere.com", Type: model.TEAM_OPEN}
team = Client.Must(Client.CreateTeam(team)).Data.(*model.Team)
user1 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey@test.com", Nickname: "Corey Hulen", Password: "pwd"}
user1 = Client.Must(Client.CreateUser(user1, "")).Data.(*model.User)
store.Must(Srv.Store.User().VerifyEmail(user1.Id))
- Client.LoginByEmail(team.Domain, user1.Email, "pwd")
+ Client.LoginByEmail(team.Name, user1.Email, "pwd")
channel1 := &model.Channel{DisplayName: "Test Web Scoket 1", Name: "a" + model.NewId() + "a", Type: model.CHANNEL_OPEN, TeamId: team.Id}
channel1 = Client.Must(Client.CreateChannel(channel1)).Data.(*model.Channel)
@@ -42,7 +42,7 @@ func TestSocket(t *testing.T) {
user2 := &model.User{TeamId: team.Id, Email: model.NewId() + "corey@test.com", Nickname: "Corey Hulen", Password: "pwd"}
user2 = Client.Must(Client.CreateUser(user2, "")).Data.(*model.User)
store.Must(Srv.Store.User().VerifyEmail(user2.Id))
- Client.LoginByEmail(team.Domain, user2.Email, "pwd")
+ Client.LoginByEmail(team.Name, user2.Email, "pwd")
header2 := http.Header{}
header2.Set(model.HEADER_AUTH, "BEARER "+Client.AuthToken)