Skip to content

Commit b0c6e1b

Browse files
committed
update test
1 parent f0fc75b commit b0c6e1b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/imagekit/api_service/file_test.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,13 @@
889889
expect(@ac[:method]).to eq('put')
890890
expect(resp[:code]).to eq(200)
891891
end
892+
893+
it 'test_rename with the option purge_cache' do
894+
source_file = 'test/dummy.png'
895+
new_name = 'my_image.png'
896+
resp = @sut.rename(file_path: source_file, new_file_name: new_name, purge_cache: true)
897+
expect(@ac[:payload]).to eq("{\"filePath\":\"test/dummy.png\",\"newFileName\":\"my_image.png\",\"purgeCache\":true}")
898+
end
892899
end
893900

894901
context 'stream file' do

0 commit comments

Comments
 (0)