2019-03-30 03:23:56 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-05-18 08:24:34 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 14:09:03 -04:00
|
|
|
RSpec.describe Editable do
|
2017-08-24 12:26:24 -04:00
|
|
|
describe '#edited?' do
|
2017-05-18 08:24:34 -04:00
|
|
|
let(:issue) { create(:issue, last_edited_at: nil) }
|
|
|
|
let(:edited_issue) { create(:issue, created_at: 3.days.ago, last_edited_at: 2.days.ago) }
|
|
|
|
|
2017-08-24 12:26:24 -04:00
|
|
|
it { expect(issue.edited?).to eq(false) }
|
|
|
|
it { expect(edited_issue.edited?).to eq(true) }
|
2017-05-18 08:24:34 -04:00
|
|
|
end
|
|
|
|
end
|