debian-mirror-gitlab/spec/models/concerns/editable_spec.rb

14 lines
365 B
Ruby
Raw Normal View History

2019-05-18 00:54:41 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Editable do
2018-03-17 18:26:18 +05:30
describe '#edited?' do
2017-08-17 22:00:37 +05:30
let(:issue) { create(:issue, last_edited_at: nil) }
let(:edited_issue) { create(:issue, created_at: 3.days.ago, last_edited_at: 2.days.ago) }
2018-03-17 18:26:18 +05:30
it { expect(issue.edited?).to eq(false) }
it { expect(edited_issue.edited?).to eq(true) }
2017-08-17 22:00:37 +05:30
end
end