aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/api_issue_subscription_test.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-05-01 00:55:24 +0200
committerGitHub <noreply@github.com>2020-04-30 23:55:24 +0100
commite9e8638f1889daaff159427d48c7ef94e13ff707 (patch)
treea51898519f17f866747120706fe9a6ff445b580c /integrations/api_issue_subscription_test.go
parent4974b7c120102b49548197e58c7a58181ba52170 (diff)
downloadgitea-e9e8638f1889daaff159427d48c7ef94e13ff707.tar.gz
gitea-e9e8638f1889daaff159427d48c7ef94e13ff707.zip
Return issue subscription status from API subscribe (#10966)
* [API] issue subscription indicate by http status * CI.restart()
Diffstat (limited to 'integrations/api_issue_subscription_test.go')
-rw-r--r--integrations/api_issue_subscription_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/integrations/api_issue_subscription_test.go b/integrations/api_issue_subscription_test.go
index 5d2956c4e0..d0b1921015 100644
--- a/integrations/api_issue_subscription_test.go
+++ b/integrations/api_issue_subscription_test.go
@@ -58,9 +58,17 @@ func TestAPIIssueSubscriptions(t *testing.T) {
session.MakeRequest(t, req, http.StatusCreated)
testSubscription(issue1, false)
+ req = NewRequest(t, "DELETE", urlStr)
+ session.MakeRequest(t, req, http.StatusOK)
+ testSubscription(issue1, false)
+
issue5Repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: issue5.RepoID}).(*models.Repository)
urlStr = fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/subscriptions/%s?token=%s", issue5Repo.OwnerName, issue5Repo.Name, issue5.Index, owner.Name, token)
req = NewRequest(t, "PUT", urlStr)
session.MakeRequest(t, req, http.StatusCreated)
testSubscription(issue5, true)
+
+ req = NewRequest(t, "PUT", urlStr)
+ session.MakeRequest(t, req, http.StatusOK)
+ testSubscription(issue5, true)
}