Skip to content

Commit

Permalink
alienscience#1 developing test suite. Added tests for CAPABILITY and …
Browse files Browse the repository at this point in the history
…LOGOUT. Other commands TODO.
  • Loading branch information
twitchyliquid64 authored and Alexandru Plugaru committed Nov 4, 2014
1 parent 879214a commit e5f86c6
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,18 @@ func TestCapabilityCommand( t *testing.T){
resp := cap.execute(session)
if (resp.tag != "A00001") || (resp.message != "CAPABILITY completed") || (resp.untagged[0] != "CAPABILITY IMAP4rev1"){
t.Error("Capability Failed - unexpected response.")
fmt.Println(resp)
}
}



func TestLogoutCommand( t *testing.T){
_, session := setupTest()
log := &logout{tag: "A00004"}
resp := log.execute(session)
if (resp.tag != "A00004") || (resp.message != "LOGOUT completed") || (resp.untagged[0] != "BYE IMAP4rev1 Server logging out"){
t.Error("Logout Failed - unexpected response.")
fmt.Println(resp)
}
fmt.Println(resp)
//t.Error("Load() did not error, should have fileNotFound")
}

0 comments on commit e5f86c6

Please sign in to comment.