Skip to content

Commit

Permalink
fixing the failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pamatyatake2 committed Oct 25, 2024
1 parent cd81930 commit 8009c08
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/serializers/saved_search_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class SavedSearchSerializer
attribute :user do |object|
user = object.try(:user)
{
css_id: user.try(:css_id),
full_name: user.try(:full_name),
cssId: user.try(:css_id),
fullName: user.try(:full_name),
id: user.id
}
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`Personnel component renders correctly renders correctly 1`] = `
</h1>
<a
class="usa-button-secondary"
href="/vha/report/searches"
href="/vha/searches"
type="button"
>
View saved searches
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`ReportPage renders correctly renders correctly 1`] = `
</h1>
<a
class="usa-button-secondary"
href="/undefined/report/searches"
href="/undefined/searches"
type="button"
>
View saved searches
Expand Down
2 changes: 1 addition & 1 deletion spec/feature/non_comp/saved_searches_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
feature "Saved Searches", :postgres do
let(:non_comp_org) { VhaBusinessLine.singleton }
let(:user) { create(:default_user, css_id: "REPORT USER", full_name: "Report User") }
let(:vha_saved_searches_url) { "/decision_reviews/vha/report/searches" }
let(:vha_saved_searches_url) { "/decision_reviews/vha/searches" }

before do
User.stub = user
Expand Down
8 changes: 5 additions & 3 deletions spec/models/serializers/saved_search_serializer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
description: "my first search",
savedSearch: "{report_type: 'event_type_action'}",
createdAt: saved_search.created_at,
userCssId: user.css_id,
userFullName: user.full_name,
userId: user.id
user: {
cssId: user.css_id,
fullName: user.full_name,
id: user.id
}
}
expect(subject.serializable_hash[:data][:attributes]).to eq(serializable_hash)
end
Expand Down

0 comments on commit 8009c08

Please sign in to comment.