diaspora/spec/controllers/jasmine_fixtures/notifications_spec.rb
2021-04-11 01:51:38 +02:00

21 lines
689 B
Ruby

# frozen_string_literal: true
describe NotificationsController, :type => :controller do
describe '#index' do
before do
sign_in alice, scope: :user
@post = FactoryBot.create(:status_message)
FactoryBot.create(:notification, :recipient => alice, :target => @post)
get :read_all
FactoryBot.create(:notification, :recipient => alice, :target => @post)
eve.share_with(alice.person, eve.aspects.first)
end
it "generates a jasmine fixture", :fixture => true do
get :index
save_fixture(html_for("body"), "notifications")
get :index, format: :json
save_fixture(response.body, "notifications_collection")
end
end
end