Skip to content

Conversation

@21Tulasi
Copy link

@21Tulasi 21Tulasi commented Dec 8, 2025

No description provided.

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

2 Warnings
⚠️ Schema changes detected without a corresponding DB migration.
⚠️ RSpec tests seem shallow (single it blocks or no context). Consider improving test structure.

Generated by 🚫 Danger

Copy link
Member

@efg efg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -0,0 +1,7 @@
class QuestionTypesController < ApplicationController
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be ItemTypesController

@@ -0,0 +1,7 @@
class QuestionType < ApplicationRecord
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be ItemType

validates :name, presence: true, uniqueness: true

# Associations (if any later)
# has_many :questionnaires, foreign_key: :questionnaire_type, primary_key: :name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has_many: consider replacing by belongs_to:

end

# Check_for_question_associations checks if questionnaire has associated questions or not
# Check_for_question_associations checks if questionnaire has associated items or not
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check_for_item_associations

@github-actions
Copy link

🚨 RSpec Tests Report

Failing Model Test Cases:
rspec ./spec/models/item_spec.rb:60 # Item validations is not valid without a questionnaire

Failing Controller Test Cases:
rspec ./spec/requests/api/v1/questionnaires_controller_spec.rb:191 # questionnaires /questionnaires/{id} put not found returns a 404 response
rspec ./spec/requests/api/v1/questionnaires_controller_spec.rb:204 # questionnaires /questionnaires/{id} put unprocessable entity returns a 422 response
rspec ./spec/requests/api/v1/questionnaires_controller_spec.rb:242 # questionnaires /questionnaires/{id} patch not found returns a 404 response
rspec ./spec/requests/api/v1/questionnaires_controller_spec.rb:255 # questionnaires /questionnaires/{id} patch unprocessable entity returns a 422 response

@github-actions
Copy link

🚨 RSpec Tests Report

Failing Controller Test Cases:
rspec ./spec/requests/api/v1/questionnaires_controller_spec.rb:191 # questionnaires /questionnaires/{id} put not found returns a 404 response
rspec ./spec/requests/api/v1/questionnaires_controller_spec.rb:204 # questionnaires /questionnaires/{id} put unprocessable entity returns a 422 response
rspec ./spec/requests/api/v1/questionnaires_controller_spec.rb:242 # questionnaires /questionnaires/{id} patch not found returns a 404 response
rspec ./spec/requests/api/v1/questionnaires_controller_spec.rb:255 # questionnaires /questionnaires/{id} patch unprocessable entity returns a 422 response

@github-actions
Copy link

🚨 RSpec Tests Report

All tests passed.

@vihar2712 vihar2712 self-requested a review January 21, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants