github.com/chenbh/concourse/v6@v6.4.2/atc/integration/configuration_test.go (about)

     1  package integration_test
     2  
     3  import (
     4  	"net/http"
     5  
     6  	. "github.com/onsi/ginkgo"
     7  	. "github.com/onsi/gomega"
     8  )
     9  
    10  var _ = Describe("Default Configuration", func() {
    11  
    12  	Context("when adding a user to the main team config", func() {
    13  		BeforeEach(func() {
    14  			cmd.Auth.MainTeamFlags.LocalUsers = []string{"test"}
    15  		})
    16  
    17  		It("grants the user access to the main team", func() {
    18  			client := login(atcURL, "test", "test")
    19  
    20  			teams, err := client.ListTeams()
    21  			Expect(err).NotTo(HaveOccurred())
    22  			Expect(teams).To(HaveLen(1))
    23  			Expect(teams[0].Name).To(Equal("main"))
    24  		})
    25  	})
    26  
    27  	It("X-Frame-Options header prevents clickjacking by default", func() {
    28  		resp, err := http.Get(atcURL)
    29  		Expect(err).NotTo(HaveOccurred())
    30  		Expect(resp.Header.Get("x-frame-options")).To(Equal("deny"))
    31  	})
    32  })