<commit_before>package web_test

import (
	"database/sql"

	"github.com/cloudfoundry-incubator/notifications/collections"
	"github.com/cloudfoundry-incubator/notifications/web"
	"github.com/cloudfoundry-incubator/notifications/web/senders"
	"github.com/gorilla/mux"
	"github.com/pivotal-golang/lager"
	"github.com/ryanmoran/stack"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("SendersRouter", func() {
	var (
		logging     web.RequestLogging
		auth        web.Authenticator
		dbAllocator web.DatabaseAllocator
		router      *mux.Router
	)

	BeforeEach(func() {
		logging = web.NewRequestLogging(lager.NewLogger("log-prefix"))
		auth = web.NewAuthenticator("some-public-key", "notifications.write")
		dbAllocator = web.NewDatabaseAllocator(&sql.DB{}, false)
		router = web.NewSendersRouter(logging, auth, dbAllocator, collections.SendersCollection{})
	})

	It("routes POST /senders", func() {
		s := router.Get("POST /senders").GetHandler().(stack.Stack)
		Expect(s.Handler).To(BeAssignableToTypeOf(senders.CreateHandler{}))

		requestLogging := s.Middleware[0].(web.RequestLogging)
		Expect(requestLogging).To(Equal(logging))

		authenticator := s.Middleware[1].(web.Authenticator)
		Expect(authenticator).To(Equal(auth))

		databaseAllocator := s.Middleware[2].(web.DatabaseAllocator)
		Expect(databaseAllocator).To(Equal(dbAllocator))
	})

	PIt("routes GET /senders/{id}", func() {
		handler := router.Get("GET /senders/{id}").GetHandler()
		Expect(handler).To(BeAssignableToTypeOf(senders.GetHandler{}))
	})
})<commit_msg>Removes senders get handler test<commit_after>package web_test

import (
	"database/sql"

	"github.com/cloudfoundry-incubator/notifications/collections"
	"github.com/cloudfoundry-incubator/notifications/web"
	"github.com/cloudfoundry-incubator/notifications/web/senders"
	"github.com/gorilla/mux"
	"github.com/pivotal-golang/lager"
	"github.com/ryanmoran/stack"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
)

var _ = Describe("SendersRouter", func() {
	var (
		logging     web.RequestLogging
		auth        web.Authenticator
		dbAllocator web.DatabaseAllocator
		router      *mux.Router
	)

	BeforeEach(func() {
		logging = web.NewRequestLogging(lager.NewLogger("log-prefix"))
		auth = web.NewAuthenticator("some-public-key", "notifications.write")
		dbAllocator = web.NewDatabaseAllocator(&sql.DB{}, false)
		router = web.NewSendersRouter(logging, auth, dbAllocator, collections.SendersCollection{})
	})

	It("routes POST /senders", func() {
		s := router.Get("POST /senders").GetHandler().(stack.Stack)
		Expect(s.Handler).To(BeAssignableToTypeOf(senders.CreateHandler{}))

		requestLogging := s.Middleware[0].(web.RequestLogging)
		Expect(requestLogging).To(Equal(logging))

		authenticator := s.Middleware[1].(web.Authenticator)
		Expect(authenticator).To(Equal(auth))

		databaseAllocator := s.Middleware[2].(web.DatabaseAllocator)
		Expect(databaseAllocator).To(Equal(dbAllocator))
	})
})
{'fraction_non_alphanumeric': 0.15153560580492745, 'fraction_numerical': 0.0020249746878164025, 'mean_word_length': 5.319829424307036, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7361345', 'n_tokens_mistral': 1082, 'n_tokens_neox': 1031, 'n_words': 122}