diff options
author | Rémy Coutable <remy@rymai.me> | 2017-08-11 13:36:03 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-08-11 15:53:17 +0300 |
commit | 1b413bd62fa07930298874dff7477c239d7ab80f (patch) | |
tree | 73b3f74a47e87ab9d377aa3cb2ed47d83422a516 /spec/models/issue_spec.rb | |
parent | c62ae6cfd70d518386fdbcb9714d18ac4f5e8c31 (diff) |
Enable Timecop safe mode
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/models/issue_spec.rb')
-rw-r--r-- | spec/models/issue_spec.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index 6d825ba68d1..9203f6562f2 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -57,18 +57,14 @@ describe Issue do end describe '#closed_at' do - after do - Timecop.return - end - - let!(:now) { Timecop.freeze(Time.now) } - it 'sets closed_at to Time.now when issue is closed' do issue = create(:issue, state: 'opened') + expect(issue.closed_at).to be_nil + issue.close - expect(issue.closed_at).to eq(now) + expect(issue.closed_at).to be_present end end |