Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
andysellick committed Feb 6, 2024
1 parent 74f29b5 commit b67a64b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
url: false,

init: function (callback) {
console.log('singleConsent init', callback)
if (!this.shouldUseConsentApi()) {
console.log('should not use consent api, calling callback')
if (callback) {
callback()
}
Expand All @@ -24,6 +26,7 @@
this.url = 'production'
}
}
console.log('singleConsentApi url is', this.url)
// create the consent API object
window.GOVUK.singleConsent.consentApiObj = new GovSingleConsent(callback, this.url)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('The single consent cookie code', function () {
beforeEach(function () {
spyOn(window.GOVUK, 'triggerEvent').and.callThrough()
spyOn(window.GOVUK.singleConsent, 'apiCallBack').and.callThrough()
window.GOVUK.useSingleConsentApi = true
jasmine.Ajax.install()
})

Expand Down

0 comments on commit b67a64b

Please sign in to comment.