diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-08-02 15:38:03 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-08-02 15:38:03 +0300 |
commit | 6515ec09bbfa25027d1b8a1240e09bc1c6edbcfb (patch) | |
tree | 0113d36deb3a856a4effe6f10f054e6019382a95 /spec/models/merge_request_diff_spec.rb | |
parent | f8aeb8cdac98108bca5d1be2a382c32df6a500e5 (diff) |
Chnage the way how merge request diff is initialized and saved
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/models/merge_request_diff_spec.rb')
-rw-r--r-- | spec/models/merge_request_diff_spec.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/spec/models/merge_request_diff_spec.rb b/spec/models/merge_request_diff_spec.rb index 0a55515e8c6..f2954a39b08 100644 --- a/spec/models/merge_request_diff_spec.rb +++ b/spec/models/merge_request_diff_spec.rb @@ -1,15 +1,6 @@ require 'spec_helper' describe MergeRequestDiff, models: true do - describe 'initialize new object' do - subject { build(:merge_request).merge_request_diffs.build } - - it { expect(subject).to be_valid } - it { expect(subject.head_commit_sha).to eq('5937ac0a7beb003549fc5fd26fc247adbce4a52e') } - it { expect(subject.base_commit_sha).to eq('ae73cb07c9eeaf35924a10f713b364d32b2dd34f') } - it { expect(subject.start_commit_sha).to eq('0b4bc9a49b562e85de7cc9e834518ea6828729b9') } - end - describe 'create new record' do subject { create(:merge_request).merge_request_diff } @@ -17,6 +8,9 @@ describe MergeRequestDiff, models: true do it { expect(subject).to be_persisted } it { expect(subject.commits.count).to eq(5) } it { expect(subject.diffs.count).to eq(8) } + it { expect(subject.head_commit_sha).to eq('5937ac0a7beb003549fc5fd26fc247adbce4a52e') } + it { expect(subject.base_commit_sha).to eq('ae73cb07c9eeaf35924a10f713b364d32b2dd34f') } + it { expect(subject.start_commit_sha).to eq('0b4bc9a49b562e85de7cc9e834518ea6828729b9') } end describe '#diffs' do |