/post_replacements: allow updating image metadata in past replacements.

This commit is contained in:
evazion
2017-12-18 17:57:05 -06:00
parent e6acd6f2d6
commit fa941e9480
3 changed files with 35 additions and 1 deletions

View File

@@ -43,6 +43,25 @@ class PostReplacementsControllerTest < ActionController::TestCase
end
end
context "update action" do
should "update the replacement" do
params = {
format: :json,
id: @post_replacement.id,
post_replacement: {
file_size_was: 23,
file_size: 42,
}
}
put :update, params, { user_id: @user.id }
@post_replacement.reload
assert_equal(23, @post_replacement.file_size_was)
assert_equal(42, @post_replacement.file_size)
end
end
context "index action" do
should "render" do
get :index, {format: :json}