spec/controllers/stenographer/changes_controller_spec.rb in stenographer-rails-0.7.1 vs spec/controllers/stenographer/changes_controller_spec.rb in stenographer-rails-0.7.3
- old
+ new
@@ -1,12 +1,12 @@
# frozen_string_literal: true
describe Stenographer::ChangesController, type: :controller do
routes { Stenographer::Engine.routes }
- let!(:first_change) { create(:change, created_at: 2.weeks.ago, environments: 'env1') }
- let!(:newer_change) { create(:change, created_at: 1.week.ago, environments: 'env2') }
+ let!(:first_change) { create(:change, created_at: 2.weeks.ago, environments: 'env1', visible: true) }
+ let!(:newer_change) { create(:change, created_at: 1.week.ago, environments: 'env2', visible: true) }
let!(:hidden_change) { create(:change, visible: false) }
describe '#create' do
let(:example_response) { File.read("#{Stenographer::Engine.root}/spec/fixtures/github_push_notification.json") }
let(:master_branch_response) { example_response.gsub('refs/heads/cheetos', 'refs/heads/master') }
@@ -66,10 +66,10 @@
describe 'order' do
before do
index_action
end
- it 'created at desc' do
+ it 'orders by created_at, descending' do
expect(assigns(:changes)).to match_array([newer_change, first_change])
end
end
it 'renders the index page' do