about summary refs log tree commit diff
path: root/spec/fabricators/assets
diff options
context:
space:
mode:
authorslice <ryaneft@gmail.com>2019-03-31 22:30:46 -0700
committerEugen Rochko <eugen@zeonfederated.com>2019-04-01 07:30:46 +0200
commit85973f4f37c8b94422f267654018d0d7f88ba32b (patch)
tree76aa1adb9f7543f68af7f1dbeb735386e5c03a97 /spec/fabricators/assets
parentabdf225353dfb9791933b5d2dbcd038dcdb656df (diff)
Improvements to image upload validation and creation (#10431)
* Check if image value is nil? before creating an image

Check if uploaded images aren't nil before creating SiteUpload models
for them.

* Validate presence of file in SiteUpload

* Fix file presence validation

* Fabricate SiteUpload#file

* Add link to Creative Commons license
Diffstat (limited to 'spec/fabricators/assets')
-rw-r--r--spec/fabricators/assets/TEAPOT6
-rw-r--r--spec/fabricators/assets/utah_teapot.pngbin0 -> 248232 bytes
2 files changed, 6 insertions, 0 deletions
diff --git a/spec/fabricators/assets/TEAPOT b/spec/fabricators/assets/TEAPOT
new file mode 100644
index 000000000..e624ecb4c
--- /dev/null
+++ b/spec/fabricators/assets/TEAPOT
@@ -0,0 +1,6 @@
+This "Utah teapot" photograph is licensed under the Creative Commons
+Attribution-Share Alike 3.0 Unported license:
+  https://creativecommons.org/licenses/by-sa/3.0/deed.en
+
+Original source of work:
+  https://commons.wikimedia.org/wiki/File:Utah_teapot_simple_2.png
diff --git a/spec/fabricators/assets/utah_teapot.png b/spec/fabricators/assets/utah_teapot.png
new file mode 100644
index 000000000..6708361e5
--- /dev/null
+++ b/spec/fabricators/assets/utah_teapot.png
Binary files differ