dawarich/spec/requests/export_spec.rb

21 lines
456 B
Ruby
Raw Normal View History

2024-04-25 16:46:20 -04:00
# frozen_string_literal: true
2024-03-23 16:46:18 -04:00
require 'rails_helper'
2024-04-25 16:46:20 -04:00
RSpec.describe 'Exports', type: :request do
describe 'GET /create' do
2024-03-23 16:46:18 -04:00
before do
2024-04-25 16:46:20 -04:00
stub_request(:any, 'https://api.github.com/repos/Freika/dawarich/tags')
.to_return(status: 200, body: '[{"name": "1.0.0"}]', headers: {})
2024-03-23 16:46:18 -04:00
sign_in create(:user)
end
2024-04-25 16:46:20 -04:00
it 'returns http success' do
get '/export'
2024-03-23 16:46:18 -04:00
expect(response).to have_http_status(:success)
end
end
end