diff options
author | James Lopez <james@jameslopez.es> | 2016-05-05 16:24:09 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-05-05 16:24:09 +0200 |
commit | 2a135866a24170e1db106885d4134e33141c07dd (patch) | |
tree | f490a71d53799b46701fdde45bd6180d085caba3 /spec/features/projects | |
parent | f927e7280e0810eb568d13d80b2eddf0fc51c38d (diff) | |
download | gitlab-ce-2a135866a24170e1db106885d4134e33141c07dd.tar.gz |
added more tests to integration spec
Diffstat (limited to 'spec/features/projects')
-rw-r--r-- | spec/features/projects/import_export/import_file_spec.rb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/spec/features/projects/import_export/import_file_spec.rb b/spec/features/projects/import_export/import_file_spec.rb index b9173e44554..a7da7a21ea8 100644 --- a/spec/features/projects/import_export/import_file_spec.rb +++ b/spec/features/projects/import_export/import_file_spec.rb @@ -7,6 +7,7 @@ feature 'project import', feature: true, js: true do let!(:namespace) { create(:namespace, name: "asd", owner: user) } let(:file) { File.join(Rails.root, 'spec', 'features', 'projects', 'import_export', 'test_project_export.tar.gz') } let(:export_path) { "#{Dir::tmpdir}/import_file_spec" } + let(:project) { Project.last } background do allow_any_instance_of(Gitlab::ImportExport).to receive(:storage_path).and_return(export_path) login_as(user) @@ -32,8 +33,15 @@ feature 'project import', feature: true, js: true do click_on 'Continue to the next step' # import starts - expect(Project.last).not_to be_nil - expect(Project.last.issues).not_to be_empty - expect(Project.last.repo_exists?).to be true + expect(project).not_to be_nil + expect(project.issues).not_to be_empty + expect(project.merge_requests).not_to be_empty + expect(project.repo_exists?).to be true + expect(wiki_exists?).to be true + end + + def wiki_exists? + wiki = ProjectWiki.new(project) + File.exists?(wiki.repository.path_to_repo) && !wiki.repository.empty? end end |