gearheads
/
mastodon
Archived
2
0
Fork 0
This repository has been archived on 2024-06-09. You can view files and clone it, but cannot push or open issues/pull-requests.
mastodon/spec/models/rule_spec.rb

20 lines
507 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2021-02-21 19:50:12 +01:00
require 'rails_helper'
describe Rule do
describe 'scopes' do
describe 'ordered' do
let(:deleted_rule) { Fabricate(:rule, deleted_at: 10.days.ago) }
let(:first_rule) { Fabricate(:rule, deleted_at: nil, priority: 1) }
let(:last_rule) { Fabricate(:rule, deleted_at: nil, priority: 10) }
it 'finds the correct records' do
results = described_class.ordered
expect(results).to eq([first_rule, last_rule])
end
end
end
2021-02-21 19:50:12 +01:00
end