Improve app/policies coverage (#32426)
		
	This commit is contained in:
		
					parent
					
						
							
								28131b4b00
							
						
					
				
			
			
				commit
				
					
						9e8f099d38
					
				
			
		
					 35 changed files with 264 additions and 55 deletions
				
			
		|  | @ -1,7 +1,6 @@ | |||
| # frozen_string_literal: true | ||||
| 
 | ||||
| require 'rails_helper' | ||||
| require 'pundit/rspec' | ||||
| 
 | ||||
| RSpec.describe DomainBlockPolicy do | ||||
|   subject { described_class } | ||||
|  | @ -9,7 +8,7 @@ RSpec.describe DomainBlockPolicy do | |||
|   let(:admin)   { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account } | ||||
|   let(:john)    { Fabricate(:account) } | ||||
| 
 | ||||
|   permissions :index?, :show?, :create?, :destroy? do | ||||
|   permissions :index?, :show?, :create?, :destroy?, :update? do | ||||
|     context 'when admin' do | ||||
|       it 'permits' do | ||||
|         expect(subject).to permit(admin, DomainBlock) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue