diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-01-28 15:12:24 +0100 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-01-28 15:12:24 +0100 |
commit | b7ec476205173b9ca1780843ceb4617fdde0b9d7 (patch) | |
tree | 85e3c3e5012eefc78b51823b1c45185df447b720 /spec/models | |
parent | 30b0d06e9f74f0068926314ec03b003fbd86c8f2 (diff) | |
parent | 9bf47f06ab69a1592cec87825aaaf5bb4adec464 (diff) | |
download | gitlab-ce-b7ec476205173b9ca1780843ceb4617fdde0b9d7.tar.gz |
Merge branch 'master' into mr-merge-basemr-merge-base
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/concerns/case_sensitivity_spec.rb | 12 | ||||
-rw-r--r-- | spec/models/event_spec.rb | 21 |
2 files changed, 6 insertions, 27 deletions
diff --git a/spec/models/concerns/case_sensitivity_spec.rb b/spec/models/concerns/case_sensitivity_spec.rb index 25b3f4e50da..6535246bf2d 100644 --- a/spec/models/concerns/case_sensitivity_spec.rb +++ b/spec/models/concerns/case_sensitivity_spec.rb @@ -37,7 +37,7 @@ describe CaseSensitivity, models: true do with(%q{LOWER("foo"."bar") = LOWER(:value)}, value: 'bar'). and_return(criteria) - expect(model.iwhere(:'foo.bar' => 'bar')).to eq(criteria) + expect(model.iwhere('foo.bar': 'bar')).to eq(criteria) end end @@ -87,8 +87,8 @@ describe CaseSensitivity, models: true do with(%q{LOWER("foo"."baz") = LOWER(:value)}, value: 'baz'). and_return(final) - got = model.iwhere(:'foo.bar' => 'bar', - :'foo.baz' => 'baz') + got = model.iwhere('foo.bar': 'bar', + 'foo.baz': 'baz') expect(got).to eq(final) end @@ -127,7 +127,7 @@ describe CaseSensitivity, models: true do with(%q{`foo`.`bar` = :value}, value: 'bar'). and_return(criteria) - expect(model.iwhere(:'foo.bar' => 'bar')). + expect(model.iwhere('foo.bar': 'bar')). to eq(criteria) end end @@ -178,8 +178,8 @@ describe CaseSensitivity, models: true do with(%q{`foo`.`baz` = :value}, value: 'baz'). and_return(final) - got = model.iwhere(:'foo.bar' => 'bar', - :'foo.baz' => 'baz') + got = model.iwhere('foo.bar': 'bar', + 'foo.baz': 'baz') expect(got).to eq(final) end diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb index 071582b0282..ec2a923f91b 100644 --- a/spec/models/event_spec.rb +++ b/spec/models/event_spec.rb @@ -65,27 +65,6 @@ describe Event, models: true do it { expect(@event.author).to eq(@user) } end - describe '.latest_update_time' do - describe 'when events are present' do - let(:time) { Time.utc(2015, 1, 1) } - - before do - create(:closed_issue_event, updated_at: time) - create(:closed_issue_event, updated_at: time + 5) - end - - it 'returns the latest update time' do - expect(Event.latest_update_time).to eq(time + 5) - end - end - - describe 'when no events exist' do - it 'returns nil' do - expect(Event.latest_update_time).to be_nil - end - end - end - describe '.limit_recent' do let!(:event1) { create(:closed_issue_event) } let!(:event2) { create(:closed_issue_event) } |