diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-08-01 18:41:21 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-08-02 13:31:19 +0300 |
commit | f8aeb8cdac98108bca5d1be2a382c32df6a500e5 (patch) | |
tree | 26250d5eaca9a1c3057329f13d2666f5138600e0 /spec/models/merge_request_diff_spec.rb | |
parent | 3c1dca0301366c63d1800aa11e73a82e68e120d0 (diff) |
Change merge request diff creation from callback to part of the service
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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/models/merge_request_diff_spec.rb b/spec/models/merge_request_diff_spec.rb index 16bba82181b..0a55515e8c6 100644 --- a/spec/models/merge_request_diff_spec.rb +++ b/spec/models/merge_request_diff_spec.rb @@ -11,9 +11,10 @@ describe MergeRequestDiff, models: true do end describe 'create new record' do - subject { create(:merge_request) } + subject { create(:merge_request).merge_request_diff } it { expect(subject).to be_valid } + it { expect(subject).to be_persisted } it { expect(subject.commits.count).to eq(5) } it { expect(subject.diffs.count).to eq(8) } end |