File: oauth_case.rb

package info (click to toggle)
ruby-oauth 0.5.4-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 584 kB
  • sloc: ruby: 4,070; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 489 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'minitest/autorun'
require 'oauth/signature'
require 'oauth/request_proxy/mock_request'


class OAuthCase < Minitest::Test
  # avoid whining about a lack of tests
  def run(*args)
    @method_name ||= nil
    return if @method_name.to_s == "default_test"
    super
  end

  protected

  # Creates a fake request
  def request(params={},method='GET',uri="http://photos.example.net/photos")
    OAuth::RequestProxy.proxy({'parameters'=>params,'method'=>method,'uri'=>uri})
  end
end