Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Jan 12, 2025
1 parent 81f8d52 commit 199321a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/reply_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2023, 2024 Dima Krasner
Copyright 2023 - 2025 Dima Krasner
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -264,7 +264,7 @@ func TestReply_SelfReply(t *testing.T) {
assert.NoError((inbox.FeedUpdater{Domain: domain, Config: server.cfg, DB: server.db}).Run(context.Background()))

users := server.Handle("/users", server.Bob)
assert.NotContains(users, "Welcome me")
assert.Contains(users, "Welcome me")

local := server.Handle("/local", nil)
assert.NotContains(local, "Hello world")
Expand Down Expand Up @@ -359,7 +359,7 @@ func TestReply_DM(t *testing.T) {
assert.NotContains(users, "Hello Bob")

users = server.Handle("/users", server.Bob)
assert.NotContains(users, "Hello @[email protected]:8443")
assert.Contains(users, "Hello @[email protected]:8443")
assert.NotContains(users, "Hello Bob")

id := dm[15 : len(dm)-2]
Expand All @@ -374,11 +374,11 @@ func TestReply_DM(t *testing.T) {

users = server.Handle("/users", server.Alice)
assert.Contains(users, "Hello @[email protected]:8443")
assert.NotContains(users, "Hello Bob")
assert.Contains(users, "Hello Bob")

users = server.Handle("/users", server.Bob)
assert.NotContains(users, "Hello @[email protected]:8443")
assert.Contains(users, "Hello Bob")
assert.Contains(users, "Hello @[email protected]:8443")
assert.NotContains(users, "Hello Bob")
}

func TestReply_DMUnfollowed(t *testing.T) {
Expand All @@ -400,7 +400,7 @@ func TestReply_DMUnfollowed(t *testing.T) {
assert.NotContains(users, "Hello Bob")

users = server.Handle("/users", server.Bob)
assert.NotContains(users, "Hello @[email protected]:8443")
assert.Contains(users, "Hello @[email protected]:8443")
assert.NotContains(users, "Hello Bob")

id := dm[15 : len(dm)-2]
Expand All @@ -418,10 +418,10 @@ func TestReply_DMUnfollowed(t *testing.T) {

users = server.Handle("/users", server.Alice)
assert.Contains(users, "Hello @[email protected]:8443")
assert.NotContains(users, "Hello Bob")
assert.Contains(users, "Hello Bob")

users = server.Handle("/users", server.Bob)
assert.NotContains(users, "Hello @[email protected]:8443")
assert.Contains(users, "Hello @[email protected]:8443")
assert.Contains(users, "Hello Bob")
}

Expand Down

0 comments on commit 199321a

Please sign in to comment.