diff options
Diffstat (limited to 'spec/controllers/projects')
-rw-r--r-- | spec/controllers/projects/compare_controller_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/controllers/projects/compare_controller_spec.rb b/spec/controllers/projects/compare_controller_spec.rb index be19f1abc53..788a609ee40 100644 --- a/spec/controllers/projects/compare_controller_spec.rb +++ b/spec/controllers/projects/compare_controller_spec.rb @@ -19,7 +19,7 @@ describe Projects::CompareController do to: ref_to) expect(response).to be_success - expect(assigns(:diffs).length).to be >= 1 + expect(assigns(:diffs).first).to_not be_nil expect(assigns(:commits).length).to be >= 1 end @@ -32,10 +32,10 @@ describe Projects::CompareController do w: 1) expect(response).to be_success - expect(assigns(:diffs).length).to be >= 1 + expect(assigns(:diffs).first).to_not be_nil expect(assigns(:commits).length).to be >= 1 # without whitespace option, there are more than 2 diff_splits - diff_splits = assigns(:diffs)[0].diff.split("\n") + diff_splits = assigns(:diffs).first.diff.split("\n") expect(diff_splits.length).to be <= 2 end @@ -48,7 +48,7 @@ describe Projects::CompareController do to: ref_to) expect(response).to be_success - expect(assigns(:diffs)).to eq([]) + expect(assigns(:diffs).to_a).to eq([]) expect(assigns(:commits)).to eq([]) end |