1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/spec/requests/staff/people/relationships/index_spec.rb
2019-09-01 16:28:52 +05:00

29 lines
683 B
Ruby

# frozen_string_literal: true
require 'rails_helper'
RSpec.describe 'GET /staff/people/:person_id/relationships' do
let(:person) { create :initial_person }
before do
sign_in current_account.user if current_account&.user
create :supporter_relationship, person: person
create :member_relationship, person: person
create :excluded_relationship, person: person
get "/staff/people/#{person.to_param}/relationships"
end
for_account_types nil, :usual do
specify do
expect(response).to have_http_status :forbidden
end
end
for_account_types :superuser do
specify do
expect(response).to have_http_status :ok
end
end
end