summaryrefslogtreecommitdiffstats
path: root/integrations/repo_test.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-06-15 10:50:12 +0800
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-06-15 04:50:12 +0200
commit31b5e9177f7c0ddcdb97e667f0634fdd13a8d59b (patch)
tree709f6f8e6ee93e706f900d49e94a6e7b7ed1e3ed /integrations/repo_test.go
parent5b0cbf378891b82084b2cbb0e58ea628880f8c95 (diff)
downloadgitea-31b5e9177f7c0ddcdb97e667f0634fdd13a8d59b.tar.gz
gitea-31b5e9177f7c0ddcdb97e667f0634fdd13a8d59b.zip
fix collborators lack of units on orgnization repositories (#1968)
* fix collborators lack of units on orgnization repositories * also change log level to debug
Diffstat (limited to 'integrations/repo_test.go')
-rw-r--r--integrations/repo_test.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/integrations/repo_test.go b/integrations/repo_test.go
index 130418f3fd..a602d96f79 100644
--- a/integrations/repo_test.go
+++ b/integrations/repo_test.go
@@ -17,4 +17,30 @@ func TestViewRepo(t *testing.T) {
req := NewRequest(t, "GET", "/user2/repo1")
resp := MakeRequest(req)
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
+
+ req = NewRequest(t, "GET", "/user3/repo3")
+ resp = MakeRequest(req)
+ assert.EqualValues(t, http.StatusNotFound, resp.HeaderCode)
+
+ session := loginUser(t, "user1", "password")
+ resp = session.MakeRequest(t, req)
+ assert.EqualValues(t, http.StatusNotFound, resp.HeaderCode)
+}
+
+func TestViewRepo2(t *testing.T) {
+ prepareTestEnv(t)
+
+ req := NewRequest(t, "GET", "/user3/repo3")
+ session := loginUser(t, "user2", "password")
+ resp := session.MakeRequest(t, req)
+ assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
+}
+
+func TestViewRepo3(t *testing.T) {
+ prepareTestEnv(t)
+
+ req := NewRequest(t, "GET", "/user3/repo3")
+ session := loginUser(t, "user3", "password")
+ resp := session.MakeRequest(t, req)
+ assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
}