Sha256: 757906d300cf3273bc8c9162e0853ca9adc29244dbc2c18918ce16eab0071f33
Contents?: true
Size: 817 Bytes
Versions: 2
Compression:
Stored size: 817 Bytes
Contents
require 'test_helper' class AuthTest < Test::Unit::TestCase TOKEN = "12345" SECRET = "secret" context "vimeo advanced" do setup do @auth = Vimeo::Advanced::Base.new(TOKEN, SECRET) end should "recieve a valid OAuth url" do stub_custom_post("/oauth/request_token", "advanced/auth/request_token.txt") token = @auth.request_token assert_equal true, token.callback_confirmed? assert_equal "http://vimeo.com/oauth/authorize?oauth_token=#{TOKEN}", token.authorize_url end should "receive the user's credentials after checking the OAuth token" do stub_post("", "advanced/auth/check_access_token.json") auth = @auth.check_access_token assert_equal "token", auth["token"] assert_equal "write", auth["permission"] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vimeo-1.2.0 | test/vimeo/advanced/auth_test.rb |
vimeo-1.1.0 | test/vimeo/advanced/auth_test.rb |