Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Test that filename is sent to server
  • Loading branch information
JakeSidSmith committed May 7, 2019
commit 5f52467fe4b0b19118bee37856cd31718b8506e2
13 changes: 13 additions & 0 deletions tests/update-file-to-s3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ describe('Django S3 File Upload', () => {
// Check that it was called
expect(requestCalls.length).toBe(1);

expect(requestCalls[0].arguments).toEqual([
{
method: 'POST',
url: '/api/s3-file-uploads/',
headers: {
'X-CSRFToken': undefined,
},
data: {
filename: 'llama',
},
},
]);

// Get the .then calls
const { thenCalls } = requestCalls[0];

Expand Down