Cover Admin::PubSubHubHubController more (#3343)
This commit is contained in:
		
				
					committed by
					
						 Eugen Rochko
						Eugen Rochko
					
				
			
			
				
	
			
			
			
						parent
						
							91c789ec63
						
					
				
				
					commit
					7a281c477a
				
			| @@ -5,12 +5,27 @@ RSpec.describe Admin::PubsubhubbubController, type: :controller do | |||||||
|   render_views |   render_views | ||||||
|  |  | ||||||
|   describe 'GET #index' do |   describe 'GET #index' do | ||||||
|  |     around do |example| | ||||||
|  |       default_per_page = Subscription.default_per_page | ||||||
|  |       Subscription.paginates_per 1 | ||||||
|  |       example.run | ||||||
|  |       Subscription.paginates_per default_per_page | ||||||
|  |     end | ||||||
|  |  | ||||||
|     before do |     before do | ||||||
|       sign_in Fabricate(:user, admin: true), scope: :user |       sign_in Fabricate(:user, admin: true), scope: :user | ||||||
|     end |     end | ||||||
|  |  | ||||||
|     it 'returns http success' do |     it 'renders subscriptions' do | ||||||
|  |       Fabricate(:subscription) | ||||||
|  |       specified = Fabricate(:subscription) | ||||||
|  |  | ||||||
|       get :index |       get :index | ||||||
|  |  | ||||||
|  |       subscriptions = assigns(:subscriptions) | ||||||
|  |       expect(subscriptions.count).to eq 1 | ||||||
|  |       expect(subscriptions[0]).to eq specified | ||||||
|  |  | ||||||
|       expect(response).to have_http_status(:success) |       expect(response).to have_http_status(:success) | ||||||
|     end |     end | ||||||
|   end |   end | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user