test/access/oauth_application_test.rb in access-2.0.48 vs test/access/oauth_application_test.rb in access-2.0.49

- old
+ new

@@ -1,24 +1,24 @@ require './test/test_helper' class OauthApplicationTest < Minitest::Test def get_first_oauth_application - VCR.use_cassette('oauth_application search') do + VCR.use_cassette('oauth_application/search_oauth_first') do @first_oauth_application = Access::OauthApplication.search(per_page: 1).oauth_applications.first end end def get_first_access_token get_first_oauth_application - VCR.use_cassette('oauth_application token search') do + VCR.use_cassette('oauth_application/token_search_tokens_first') do @first_access_token = Access::OauthApplication.search_tokens(@first_oauth_application.id, per_page: 1).access_tokens.first end end def test_oauth_applications_search - VCR.use_cassette('oauth_application search') do + VCR.use_cassette('oauth_application/search') do oauth_applications_response = Access::OauthApplication.search(per_page: 1) assert oauth_applications_response.success first_oauth_application = oauth_applications_response.oauth_applications.first assert_kind_of Access::OauthApplicationResponse, oauth_applications_response assert_kind_of Access::Link, oauth_applications_response.links @@ -32,11 +32,11 @@ end end def test_oauth_applications_find get_first_oauth_application - VCR.use_cassette('oauth_application find') do + VCR.use_cassette('oauth_application/find') do oauth_applications_response = Access::OauthApplication.find(@first_oauth_application.id) assert oauth_applications_response.success first_oauth_application = oauth_applications_response.oauth_applications.first assert_kind_of Access::OauthApplicationResponse, oauth_applications_response assert_kind_of Access::OauthApplication, first_oauth_application @@ -44,25 +44,24 @@ end end def test_oauth_applications_search_tokens get_first_oauth_application - VCR.use_cassette('oauth_application token search') do + VCR.use_cassette('oauth_application/token_search') do access_tokens_response = Access::OauthApplication.search_tokens(@first_oauth_application.id, per_page: 1) assert access_tokens_response.success first_access_token = access_tokens_response.access_tokens.first assert_kind_of Access::TokenResponse, access_tokens_response assert_kind_of Array, access_tokens_response.access_tokens - assert_equal 1, access_tokens_response.access_tokens.count assert_kind_of Access::Link, first_access_token.links refute_kind_of Hash, first_access_token.program_filter_id # has scope? method end end def test_oauth_applications_find_token get_first_access_token - VCR.use_cassette('oauth_application token find') do + VCR.use_cassette('oauth_application/token_find') do access_tokens_response = Access::OauthApplication.find_token(@first_access_token.application_id, @first_access_token.oauth_access_token_id) assert access_tokens_response.success first_access_token = access_tokens_response.access_tokens.first assert_kind_of Access::TokenResponse, access_tokens_response assert_kind_of Array, access_tokens_response.access_tokens