From 7bac70676e8e3ed974dda720ae51ff6aebdb28c8 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 24 Apr 2019 10:20:42 +0800 Subject: [PATCH] DEV: Improve `Upload.get_from_url` test case. Follow up to a8baa6d9e711cd962f9a99232f3df76c7657397c. --- spec/models/upload_spec.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/models/upload_spec.rb b/spec/models/upload_spec.rb index 2fb9be266df..09d9078800c 100644 --- a/spec/models/upload_spec.rb +++ b/spec/models/upload_spec.rb @@ -126,6 +126,9 @@ describe Upload do upload.update!(url: "/uploads/default/12345/971308e535305c51.png") expect(Upload.get_from_url(upload.url)).to eq(upload) + + expect(Upload.get_from_url("/uploads/default/123131/971308e535305c51.png")) + .to eq(nil) end describe 'for a url a tree' do