Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
caiosba committed Feb 18, 2024
1 parent 4c9f44a commit b53a36b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/models/cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Cluster < ApplicationRecord
has_many :project_medias, through: :cluster_project_medias

belongs_to :feed
belongs_to :project_media # Center
belongs_to :project_media, optional: true # Center

def center
self.project_media || self.items.first
Expand Down
2 changes: 1 addition & 1 deletion test/controllers/graphql_controller_12_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def teardown

authenticate_with_user(@u)
query = 'query { feed(id: "' + f.id.to_s + '") { clusters(first: 10) { edges { node { id, dbid, first_item_at, last_item_at, last_request_date, last_fact_check_date, center { id }, teams(first: 10) { edges { node { name, avatar } } } } } } } }'
assert_queries(20, '=') do
assert_queries 20, '<=' do
post :create, params: { query: query }
end
assert_response :success
Expand Down
2 changes: 1 addition & 1 deletion test/models/cluster_project_media_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ def setup
ClusterProjectMedia.create!(cluster: c, project_media: nil)
end
end
end
end

0 comments on commit b53a36b

Please sign in to comment.