summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-07-15 23:41:58 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-07-15 23:41:58 +0800
commitbd44f1419784ea98ad513f2f2f67ffeb94853c04 (patch)
tree0c3ad29219379e7e96358fad57ad69cd77e2bc20 /spec
parent0f7851b7beb868511d7208a8170be905aecc731b (diff)
parent8b7932c21951de172d531ab8a3e9506c98db7483 (diff)
downloadgitlab-ce-bd44f1419784ea98ad513f2f2f67ffeb94853c04.tar.gz
Merge remote-tracking branch 'upstream/master' into new-issue-by-email
* upstream/master: navbar_icon was renamed to custom_icon in: Fix spec Don't attempt to disable statement timeout on a MySQL DB Disable statement timeout outside of transaction and during adding concurrent index Disable PostgreSQL statement timeout during migrations Add visibility icon Remove previously introduced CSS that will not be used anymore Make admin/groups view consistent with dashboard/groups Fix New Group button spacing on mobile Make CSS consistent again Rename .group-controls to .controls Remove unnecesary CSS class Change bg color of collapsed diff to blue on hover Reduce padding on collapsed diff message updated changelog fixed similar issue with gitlab.com importer because why not! fix updated_at not preserved after import - for GitLab projects Update permissons links to new page CHANGELOG Changed collapsed assignee tooltip to users name Fixes tooltip when updating the assignee Refresh branch cache after `git gc`
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/database/migration_helpers_spec.rb4
-rw-r--r--spec/lib/gitlab/import_export/project_tree_restorer_spec.rb8
-rw-r--r--spec/workers/git_garbage_collect_worker_spec.rb5
3 files changed, 16 insertions, 1 deletions
diff --git a/spec/lib/gitlab/database/migration_helpers_spec.rb b/spec/lib/gitlab/database/migration_helpers_spec.rb
index 9096ad101b0..4ec3f19e03f 100644
--- a/spec/lib/gitlab/database/migration_helpers_spec.rb
+++ b/spec/lib/gitlab/database/migration_helpers_spec.rb
@@ -13,6 +13,10 @@ describe Gitlab::Database::MigrationHelpers, lib: true do
context 'outside a transaction' do
before do
expect(model).to receive(:transaction_open?).and_return(false)
+
+ unless Gitlab::Database.postgresql?
+ allow_any_instance_of(Gitlab::Database::MigrationHelpers).to receive(:disable_statement_timeout)
+ end
end
context 'using PostgreSQL' do
diff --git a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
index 05ffec8ea0a..877be300262 100644
--- a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
+++ b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb
@@ -30,6 +30,14 @@ describe Gitlab::ImportExport::ProjectTreeRestorer, services: true do
expect(Event.where.not(data: nil).first.data[:ref]).not_to be_empty
end
+ it 'preserves updated_at on issues' do
+ restored_project_json
+
+ issue = Issue.where(description: 'Aliquam enim illo et possimus.').first
+
+ expect(issue.reload.updated_at.to_s).to eq('2016-06-14 15:02:47 UTC')
+ end
+
context 'event at forth level of the tree' do
let(:event) { Event.where(title: 'test levels').first }
diff --git a/spec/workers/git_garbage_collect_worker_spec.rb b/spec/workers/git_garbage_collect_worker_spec.rb
index a9cce8b8b59..c9f5aae0815 100644
--- a/spec/workers/git_garbage_collect_worker_spec.rb
+++ b/spec/workers/git_garbage_collect_worker_spec.rb
@@ -16,7 +16,10 @@ describe GitGarbageCollectWorker do
project.repository_storage_path,
project.path_with_namespace).
and_return(true)
- expect_any_instance_of(Repository).to receive(:after_create_branch)
+ expect_any_instance_of(Repository).to receive(:after_create_branch).and_call_original
+ expect_any_instance_of(Repository).to receive(:branch_names).and_call_original
+ expect_any_instance_of(Repository).to receive(:branch_count).and_call_original
+ expect_any_instance_of(Repository).to receive(:has_visible_content?).and_call_original
subject.perform(project.id)
end