github.com/jordwest/imap-server@v0.0.0-20200627020849-1cf758ba359f/conn/command_capability_test.go (about)

     1  package conn_test
     2  
     3  import (
     4  	"github.com/jordwest/imap-server/conn"
     5  	. "github.com/onsi/ginkgo"
     6  )
     7  
     8  var _ = Describe("CAPABILITY Command", func() {
     9  	Context("When not logged in", func() {
    10  		BeforeEach(func() {
    11  			tConn.SetState(conn.StateNotAuthenticated)
    12  		})
    13  
    14  		It("should return server capabilities", func() {
    15  			SendLine("abcd.123 CAPABILITY")
    16  			ExpectResponse("* CAPABILITY IMAP4rev1 AUTH=PLAIN")
    17  			ExpectResponse("abcd.123 OK CAPABILITY completed")
    18  		})
    19  	})
    20  
    21  })