RSpec.shared_context "set_authorization" do let(:organization_id) { SecureRandom.uuid } let(:payload) do { iss: "DocShell", iat: DateTime.now.to_i, jti: SecureRandom.uuid, exp: (DateTime.now + 1.year).to_i, account: { id: SecureRandom.uuid, email: Faker::Internet.email, }, permissions: { organization_id => permissions } } end let(:Authorization) { "Bearer #{Care::JwtService.new.encode(payload)}" } end