imgix 3.2.1 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,38 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'test_helper'
4
-
5
- class UrlTest < Imgix::Test
6
- DEMO_IMAGE_PATH = '/images/demo.png'
7
-
8
- def test_signing_with_no_params
9
- path = client.path(DEMO_IMAGE_PATH)
10
-
11
- assert_equal 'https://demo.imgix.net/images/demo.png?s=2c7c157eaf23b06a0deb2f60b81938c4', path.to_url
12
- end
13
-
14
- def test_signing_with_one
15
- path = client.path(DEMO_IMAGE_PATH)
16
- path.width = 200
17
-
18
- assert_equal 'https://demo.imgix.net/images/demo.png?w=200&s=da421114ca238d1f4a927b889f67c34e', path.to_url
19
- end
20
-
21
- def test_signing_with_multiple_params
22
- path = client.path(DEMO_IMAGE_PATH)
23
- path.height = 200
24
- path.width = 200
25
- assert_equal 'https://demo.imgix.net/images/demo.png?h=200&w=200&s=d570a1ecd765470f7b34a69b56718a7a', path.to_url
26
-
27
- path = client.path(DEMO_IMAGE_PATH)
28
- path.width = 200
29
- path.height = 200
30
- assert_equal 'https://demo.imgix.net/images/demo.png?w=200&h=200&s=00b5cde5c7b8bca8618cb911da4ac379', path.to_url
31
- end
32
-
33
- private
34
-
35
- def client
36
- @client ||= Imgix::Client.new(host: 'demo.imgix.net', secure_url_token: '10adc394', include_library_param: false)
37
- end
38
- end