gitlab-org--gitlab-foss/spec/models/concerns/editable_spec.rb

14 lines
365 B
Ruby
Raw Normal View History

# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Editable do
2017-08-24 12:26:24 -04:00
describe '#edited?' do
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) }
end
end