Skip to content

Commit

Permalink
inventory: fixed typo in inventory model.
Browse files Browse the repository at this point in the history
	- renamed pivacypolicy to privacypolicy.
	- updated the test case to reflect this change.
  • Loading branch information
Vikram Sreekumar committed Apr 3, 2017
1 parent f11883b commit 93eb934
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
14 changes: 8 additions & 6 deletions bidrequest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package openrtb

import (
"encoding/json"

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

var _ = Describe("BidRequest", func() {
var subject *BidRequest

privacyPolicy := 1
BeforeEach(func() {
err := fixture("breq.banner", &subject)
Expect(err).NotTo(HaveOccurred())
Expand All @@ -35,11 +36,12 @@ var _ = Describe("BidRequest", func() {
},
Site: &Site{
Inventory: Inventory{
ID: "234563",
Name: "Site ABCD",
Domain: "siteabcd.com",
Cat: []string{"IAB2-1", "IAB2-2"},
Publisher: &Publisher{ID: "pub12345", Name: "Publisher A"},
ID: "234563",
Name: "Site ABCD",
Domain: "siteabcd.com",
Cat: []string{"IAB2-1", "IAB2-2"},
Publisher: &Publisher{ID: "pub12345", Name: "Publisher A"},
PrivacyPolicy: &privacyPolicy,
Content: &Content{
Keywords: "keyword a,keyword b,keyword c",
},
Expand Down
14 changes: 7 additions & 7 deletions inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ type Inventory struct {
ID string `json:"id,omitempty"` // ID on the exchange
Name string `json:"name,omitempty"`
Domain string `json:"domain,omitempty"`
Cat []string `json:"cat,omitempty"` // Array of IAB content categories
SectionCat []string `json:"sectioncat,omitempty"` // Array of IAB content categories for subsection
PageCat []string `json:"pagecat,omitempty"` // Array of IAB content categories for page
PrivacyPolicy *int `json:"pivacypolicy,omitempty"` // Default: 1 ("1": has a privacy policy)
Publisher *Publisher `json:"publisher,omitempty"` // Details about the Publisher
Content *Content `json:"content,omitempty"` // Details about the Content
Keywords string `json:"keywords,omitempty"` // Comma separated list of keywords about the site.
Cat []string `json:"cat,omitempty"` // Array of IAB content categories
SectionCat []string `json:"sectioncat,omitempty"` // Array of IAB content categories for subsection
PageCat []string `json:"pagecat,omitempty"` // Array of IAB content categories for page
PrivacyPolicy *int `json:"privacypolicy,omitempty"` // Default: 1 ("1": has a privacy policy)
Publisher *Publisher `json:"publisher,omitempty"` // Details about the Publisher
Content *Content `json:"content,omitempty"` // Details about the Content
Keywords string `json:"keywords,omitempty"` // Comma separated list of keywords about the site.
Ext Extension `json:"ext,omitempty"`
}

Expand Down

0 comments on commit 93eb934

Please sign in to comment.