534a61179e
These are backend changes. Use Vue for the import feature UI for "githubish" providers (GitHub and Gitea). Add "Go to project" button after a successful import. Use CI-style status icons and improve spacing of the table and its component. Adds ETag polling to the github and gitea import jobs endpoint.
51 lines
1.1 KiB
Ruby
51 lines
1.1 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe Import::GiteaController do
|
|
include ImportSpecHelper
|
|
|
|
let(:provider) { :gitea }
|
|
let(:host_url) { 'https://try.gitea.io' }
|
|
|
|
include_context 'a GitHub-ish import controller'
|
|
|
|
def assign_host_url
|
|
session[:gitea_host_url] = host_url
|
|
end
|
|
|
|
describe "GET new" do
|
|
it_behaves_like 'a GitHub-ish import controller: GET new' do
|
|
before do
|
|
assign_host_url
|
|
end
|
|
end
|
|
end
|
|
|
|
describe "POST personal_access_token" do
|
|
it_behaves_like 'a GitHub-ish import controller: POST personal_access_token'
|
|
end
|
|
|
|
describe "GET status" do
|
|
it_behaves_like 'a GitHub-ish import controller: GET status' do
|
|
before do
|
|
assign_host_url
|
|
end
|
|
let(:extra_assign_expectations) { { gitea_host_url: host_url } }
|
|
end
|
|
end
|
|
|
|
describe 'POST create' do
|
|
it_behaves_like 'a GitHub-ish import controller: POST create' do
|
|
before do
|
|
assign_host_url
|
|
end
|
|
end
|
|
end
|
|
|
|
describe "GET realtime_changes" do
|
|
it_behaves_like 'a GitHub-ish import controller: GET realtime_changes' do
|
|
before do
|
|
assign_host_url
|
|
end
|
|
end
|
|
end
|
|
end
|