summaryrefslogtreecommitdiff
path: root/spec/models/concerns/editable_spec.rb
blob: 1d26629d0aa7017f6203b9694067f616805cac3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Editable do
  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) }

    it { expect(issue.edited?).to eq(false) }
    it { expect(edited_issue.edited?).to eq(true) }
  end
end