Skip to content

Commit 032169b

Browse files
committed
.
Signed-off-by: Gil Desmarais <[email protected]>
1 parent edd5bd0 commit 032169b

File tree

3 files changed

+25
-22
lines changed

3 files changed

+25
-22
lines changed

.github/workflows/test_build_push.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
- uses: ruby/setup-ruby@v1
3030
with:
3131
bundler-cache: true
32+
cache-version: 1
3233

3334
- run: bundle exec rspec
3435

spec/fixtures/vcr_cassettes/auto_source-github-h2r-web.yml

Lines changed: 16 additions & 15 deletions
Large diffs are not rendered by default.

spec/routes/auto_source_spec.rb

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)