File: signed_params_tests.rb

package info (click to toggle)
ruby-fog-aws 3.18.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,140 kB
  • sloc: ruby: 73,328; javascript: 14; makefile: 9; sh: 4
file content (17 lines) | stat: -rw-r--r-- 558 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# encoding: utf-8

Shindo.tests('AWS | signed_params', ['aws']) do
  returns(Fog::AWS.escape("'Stöp!' said Fred_-~./")) { '%27St%C3%B6p%21%27%20said%20Fred_-~.%2F' }

  tests('Unicode characters should be escaped') do
    unicode = ['00E9'.to_i(16)].pack('U*')
    escaped = '%C3%A9'
    returns(escaped) { Fog::AWS.escape(unicode) }
  end

  tests('Unicode characters with combining marks should be escaped') do
    unicode = ['0065'.to_i(16), '0301'.to_i(16)].pack('U*')
    escaped = 'e%CC%81'
    returns(escaped) { Fog::AWS.escape(unicode) }
  end
end