diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-08-06 15:38:55 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2019-08-06 15:38:55 +0300 |
commit | 9edf06d9c40e9508d405286c71fbc62dccf68299 (patch) | |
tree | f49c77272f270953a55b5483841148826428d3d9 /spec | |
parent | 3c03db1290298cbefb7c4bb533d424eda536a4c6 (diff) | |
parent | 5b70ffcf14539c4984a9d278e673ab963e4412fd (diff) |
Merge branch 'backport-productivty-analytics-migrations' into 'master'
Backport productivity analytics migrations
See merge request gitlab-org/gitlab-ce!31298
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/import_export/safe_model_attributes.yml | 6 | ||||
-rw-r--r-- | spec/models/merge_request_diff_spec.rb | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/spec/lib/gitlab/import_export/safe_model_attributes.yml b/spec/lib/gitlab/import_export/safe_model_attributes.yml index 28b187c3676..5fd027fd8b8 100644 --- a/spec/lib/gitlab/import_export/safe_model_attributes.yml +++ b/spec/lib/gitlab/import_export/safe_model_attributes.yml @@ -235,6 +235,12 @@ MergeRequest::Metrics: - latest_build_started_at - latest_build_finished_at - first_deployed_to_production_at +- first_comment_at +- first_commit_at +- last_commit_at +- diff_size +- modified_paths_size +- commits_count Ci::Pipeline: - id - project_id diff --git a/spec/models/merge_request_diff_spec.rb b/spec/models/merge_request_diff_spec.rb index a53add67066..e7dd7287a75 100644 --- a/spec/models/merge_request_diff_spec.rb +++ b/spec/models/merge_request_diff_spec.rb @@ -484,4 +484,12 @@ describe MergeRequestDiff do end end end + + describe '#lines_count' do + subject { diff_with_commits } + + it 'returns sum of all changed lines count in diff files' do + expect(subject.lines_count).to eq 109 + end + end end |