@@ -66,8 +66,8 @@ def app = described_class
6666 describe "GET '/auto_source/:encoded_url'" do
6767 context 'with provided basic auth' do
6868 subject ( :response ) do
69- VCR . use_cassette 'auto_source-h2r-web' do
70- get "/auto_source/#{ Base64 . urlsafe_encode64 ( 'https://github.com/html2rss/html2rss-web' ) } " ,
69+ VCR . use_cassette ( 'auto_source-github- h2r-web' , match_requests_on : [ :host ] ) do
70+ get "/auto_source/#{ Base64 . urlsafe_encode64 ( 'https://github.com/html2rss/html2rss-web/commits/master ' ) } " ,
7171 { } ,
7272 request_headers . merge ( 'HTTP_AUTHORIZATION' => basic_authorize ( username , password ) )
7373 end
@@ -83,9 +83,11 @@ def app = described_class
8383
8484 context 'when strategy is not registered' do
8585 subject ( :response ) do
86- get "/auto_source/#{ Base64 . urlsafe_encode64 ( 'https://github.com/html2rss/html2rss-web' ) } ?strategy=nope" ,
87- { } ,
88- request_headers . merge ( 'HTTP_AUTHORIZATION' => basic_authorize ( username , password ) )
86+ VCR . use_cassette ( 'auto_source-github-h2r-web' , match_requests_on : [ :host ] ) do
87+ get "/auto_source/#{ Base64 . urlsafe_encode64 ( 'https://github.com/html2rss/html2rss-web/commits/master' ) } ?strategy=nope" ,
88+ { } ,
89+ request_headers . merge ( 'HTTP_AUTHORIZATION' => basic_authorize ( username , password ) )
90+ end
8991 end
9092
9193 it 'responds with Error' , :aggregate_failures do
@@ -111,8 +113,7 @@ def app = described_class
111113
112114 describe "GET '/auto_source/:encoded_url'" do
113115 it 'responds with 400 Bad Request' , :aggregate_failures do
114- get "/auto_source/#{ Base64 . urlsafe_encode64 ( 'https://github.com/html2rss/html2rss-web' ) } " ,
115- { } ,
116+ get '/auto_source/' , { } ,
116117 request_headers . merge ( 'HTTP_AUTHORIZATION' => basic_authorize ( username , password ) )
117118
118119 expect ( last_response ) . to be_bad_request
0 commit comments