github.com/kvattikuti/drone@v0.2.1-0.20140603034306-d400229a327a/pkg/handler/testing/team_test.go (about) 1 package testing 2 3 import ( 4 //"net/http" 5 //"net/http/httptest" 6 //"net/url" 7 "testing" 8 9 //"github.com/drone/drone/database" 10 . "github.com/drone/drone/pkg/database/testing" 11 //"github.com/drone/drone/handler" 12 . "github.com/smartystreets/goconvey/convey" 13 ) 14 15 func TestTeamProfilePage(t *testing.T) { 16 // seed the database with values 17 Setup() 18 defer Teardown() 19 20 // dummy request 21 //req := http.Request{} 22 //req.Form = url.Values{} 23 24 Convey("Team Profile Page", t, func() { 25 Convey("View Profile Information", func() { 26 27 SkipConvey("Email Address is correct", func() { 28 29 }) 30 SkipConvey("Team Name is correct", func() { 31 32 }) 33 SkipConvey("GitHub Login is correct", func() { 34 35 }) 36 SkipConvey("Bitbucket Login is correct", func() { 37 38 }) 39 }) 40 Convey("Update Email Address", func() { 41 SkipConvey("With a Valid Email Address", func() { 42 43 }) 44 SkipConvey("With an Invalid Email Address", func() { 45 46 }) 47 SkipConvey("With an Empty Email Address", func() { 48 49 }) 50 }) 51 52 Convey("Update Team Name", func() { 53 SkipConvey("With a Valid Name", func() { 54 55 }) 56 SkipConvey("With an Invalid Name", func() { 57 58 }) 59 SkipConvey("With an Empty Name", func() { 60 61 }) 62 }) 63 64 Convey("Delete the Team", func() { 65 SkipConvey("Providing an Invalid Password", func() { 66 67 }) 68 SkipConvey("Providing a Valid Password", func() { 69 70 }) 71 }) 72 }) 73 } 74 75 func TestTeamMembersPage(t *testing.T) { 76 // seed the database with values 77 Setup() 78 defer Teardown() 79 80 // dummy request 81 //req := http.Request{} 82 //req.Form = url.Values{} 83 84 Convey("Team Members Page", t, func() { 85 SkipConvey("View List of Team Members", func() { 86 87 }) 88 SkipConvey("Add a New Team Member", func() { 89 90 }) 91 92 Convey("Edit a Team Member", func() { 93 SkipConvey("Modify the Role", func() { 94 95 }) 96 SkipConvey("Change to an Invalid Role", func() { 97 98 }) 99 SkipConvey("Change from Owner to Read", func() { 100 101 }) 102 }) 103 104 Convey("Delete a Team Member", func() { 105 SkipConvey("Delete a Read-only Member", func() { 106 107 }) 108 SkipConvey("Delete the Last Member", func() { 109 110 }) 111 SkipConvey("Delete the Owner", func() { 112 113 }) 114 }) 115 116 Convey("Accept Membership", func() { 117 SkipConvey("Valid Invitation", func() { 118 119 }) 120 SkipConvey("Expired Invitation", func() { 121 122 }) 123 SkipConvey("Invalid or Forged Invitation", func() { 124 125 }) 126 }) 127 }) 128 } 129 130 func TestDashboardPage(t *testing.T) { 131 // seed the database with values 132 Setup() 133 defer Teardown() 134 135 // dummy request 136 //req := http.Request{} 137 //req.Form = url.Values{} 138 139 SkipConvey("Team Dashboard", t, func() { 140 141 }) 142 143 SkipConvey("User Dashboard", t, func() { 144 145 }) 146 147 SkipConvey("Repo Dashboard", t, func() { 148 149 }) 150 151 SkipConvey("Repo Settings", t, func() { 152 153 }) 154 155 SkipConvey("Commit Dashboard", t, func() { 156 157 }) 158 159 Convey("User Account", t, func() { 160 SkipConvey("Login", func() { 161 162 }) 163 SkipConvey("Logout", func() { 164 165 }) 166 SkipConvey("Register", func() { 167 168 }) 169 SkipConvey("Sign Up", func() { 170 171 }) 172 }) 173 }