dawarich/spec/requests/stats_spec.rb

18 lines
413 B
Ruby
Raw Normal View History

2024-04-25 16:46:20 -04:00
# frozen_string_literal: true
2024-03-23 15:29:55 -04:00
require 'rails_helper'
2024-04-25 16:46:20 -04:00
RSpec.describe '/stats', type: :request do
before do
stub_request(:any, 'https://api.github.com/repos/Freika/dawarich/tags')
.to_return(status: 200, body: '[{"name": "1.0.0"}]', headers: {})
end
2024-03-23 15:29:55 -04:00
2024-04-25 16:46:20 -04:00
describe 'GET /index' do
it 'renders a successful response' do
2024-03-23 15:29:55 -04:00
get stats_url
expect(response.status).to eq(302)
end
end
end