diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-08-09 03:33:55 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-08-09 03:33:55 +0200 |
| commit | 20c735b0c5a2db9b8984848253ad99332d6211a8 (patch) | |
| tree | a4ae71c53c403c1a7740db624e43fd3163e37ab7 /test/controllers/content_controller_test.rb | |
| parent | 5203b80f47786b8adc169e80d89cd69159c44b62 (diff) | |
Attach assets to the draft instead of to every lifecycle row
Node#attach_asset! writes to the node's draft alone, creating one from the
head when none is pending. It refuses when another user holds the lock, and
when an autosave already exists
The asset_attach verb goes with it. create_new_draft names the editor on the
draft it creates and the publish entry's asset delta reports the attachment.
Diffstat (limited to 'test/controllers/content_controller_test.rb')
| -rw-r--r-- | test/controllers/content_controller_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/controllers/content_controller_test.rb b/test/controllers/content_controller_test.rb index 39fe276b..482c1ddf 100644 --- a/test/controllers/content_controller_test.rb +++ b/test/controllers/content_controller_test.rb | |||
| @@ -170,6 +170,8 @@ class ContentControllerTest < ActionController::TestCase | |||
| 170 | :upload_content_type => "image/png", | 170 | :upload_content_type => "image/png", |
| 171 | :upload_updated_at => Time.at(1_700_000_000)) | 171 | :upload_updated_at => Time.at(1_700_000_000)) |
| 172 | node.attach_asset!(asset, :user => @user1, :headline => true) | 172 | node.attach_asset!(asset, :user => @user1, :headline => true) |
| 173 | node.publish_draft! | ||
| 174 | node.reload | ||
| 173 | 175 | ||
| 174 | # has_variant? only tests File.exist?, so touching the path is enough | 176 | # has_variant? only tests File.exist?, so touching the path is enough |
| 175 | # and no ImageMagick runs in the suite. image/png takes .jpg for the | 177 | # and no ImageMagick runs in the suite. image/png takes .jpg for the |
