diff --git a/app/controllers/user_classification_count_controller.rb b/app/controllers/user_classification_count_controller.rb index 3a08926..bcce57a 100644 --- a/app/controllers/user_classification_count_controller.rb +++ b/app/controllers/user_classification_count_controller.rb @@ -16,7 +16,7 @@ def query def validate_params super - raise ValidationError, 'Cannot query top projects and query by project/workflow' if params[:project_contributions] && (params[:workflow_id] || params[:project_id]) + raise ValidationError, 'Cannot query for project contributions and query by project/workflow' if params[:project_contributions] && (params[:workflow_id] || params[:project_id]) end def sanitize_params diff --git a/spec/controllers/user_classification_count_controller_spec.rb b/spec/controllers/user_classification_count_controller_spec.rb index aafd33d..eb49985 100644 --- a/spec/controllers/user_classification_count_controller_spec.rb +++ b/spec/controllers/user_classification_count_controller_spec.rb @@ -99,13 +99,13 @@ it 'ensures you cannot query by workflow and project_contributions' do get :query, params: { id: 1, project_contributions: true, workflow_id: 1 } expect(response.status).to eq(400) - expect(response.body).to include('Cannot query top projects and query by project/workflow') + expect(response.body).to include('Cannot query for project contributions and query by project/workflow') end it 'ensures you cannot query by project and top project contributions' do get :query, params: { id: 1, project_contributions: true, project_id: 1 } expect(response.status).to eq(400) - expect(response.body).to include('Cannot query top projects and query by project/workflow') + expect(response.body).to include('Cannot query for project contributions and query by project/workflow') end it 'ensures project_contributions is an boolean' do