Skip to content

Commit

Permalink
pretty fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jho406 committed Dec 2, 2024
1 parent 03ff056 commit 8c45ab4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion superglue/lib/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const Application = forwardRef(function Application(
visit,
remote,
ujsAttributePrefix: 'data-sg',
store
store,
})

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion superglue/spec/lib/action_creators.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ describe('action creators', () => {
expect(allSuperglueActions(store)).toEqual(expectedActions)
})
})

it('defaults to the response url as the pageKey on GET requests', () => {
const store = buildStore({
superglue: {
Expand Down
7 changes: 5 additions & 2 deletions superglue/spec/lib/utils/ujs.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,10 @@ describe('ujs', () => {
const { onClick } = builder.handlers()
onClick(createFakeRemoteEvent())

expect(remote).toHaveBeenCalledWith('/foo', { method: 'GET' , pageKey: "/current"})
expect(remote).toHaveBeenCalledWith('/foo', {
method: 'GET',
pageKey: '/current',
})
})

it('does not call visit on an link does not have the visit attribute data-visit', () => {
Expand Down Expand Up @@ -293,7 +296,7 @@ describe('ujs', () => {
expect(global.FormData).toHaveBeenCalledWith(fakeFormEvent.target)
expect(remote).toHaveBeenCalledWith('/foo', {
method: 'POST',
pageKey: "/current",
pageKey: '/current',
body: { some: 'Body' },
})
})
Expand Down

0 comments on commit 8c45ab4

Please sign in to comment.