github.com/pf-qiu/concourse/v6@v6.7.3-0.20201207032516-1f455d73275f/atc/creds/noop/noop_test.go (about)

     1  package noop_test
     2  
     3  import (
     4  	"time"
     5  
     6  	. "github.com/pf-qiu/concourse/v6/atc/creds/noop"
     7  
     8  	. "github.com/onsi/ginkgo"
     9  	. "github.com/onsi/gomega"
    10  )
    11  
    12  var _ = Describe("Noop", func() {
    13  	var noop Noop
    14  
    15  	BeforeEach(func() {
    16  		noop = Noop{}
    17  	})
    18  
    19  	Describe("Get", func() {
    20  		var val interface{}
    21  		var expiration *time.Time
    22  		var found bool
    23  		var getErr error
    24  
    25  		JustBeforeEach(func() {
    26  			val, expiration, found, getErr = noop.Get("foo")
    27  		})
    28  
    29  		It("never locates the variable", func() {
    30  			Expect(val).To(BeNil())
    31  			Expect(expiration).To(BeNil())
    32  			Expect(found).To(BeFalse())
    33  			Expect(getErr).ToNot(HaveOccurred())
    34  		})
    35  	})
    36  })