Skip to content

Commit

Permalink
Show testing requests with cached attachment data
Browse files Browse the repository at this point in the history
Closes #557
  • Loading branch information
janko committed Feb 19, 2022
1 parent 78b4abe commit f0198d6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,15 @@ app.post "/photos", multipart: {
```
<!--END_DOCUSAURUS_CODE_TABS-->

If you want to test requests with cached attachment data, you can do so as
follows:

```rb
cached_file = Shrine.upload(file, :cache)

post "/photos", photo: { image: cached_file.to_json }
```

## Background jobs

If you're using background jobs with Shrine, you probably want to make them
Expand Down

0 comments on commit f0198d6

Please sign in to comment.