Skip to content

Commit

Permalink
ignore test and add necessary attribute on folder serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
Vakmeth committed Jan 29, 2024
1 parent b8dccd2 commit 0c05355
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion app/serializers/folder_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
# https://github.com/puzzle/cryptopus.

class FolderSerializer < ActiveModel::Serializer
attributes :id, :name, :description
attributes :id, :name, :description, :unread_transferred_count

has_many :encryptables, serializer: EncryptableMinimalSerializer

def unread_transferred_count
object.personal_inbox? ? object.unread_count_transferred_encryptables : nil
end
end
5 changes: 4 additions & 1 deletion spec/controllers/api/teams_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,10 @@
expect(folder_relationships_length).to be(1)
end

it 'returns encryptable files for team_id, in order from created_at' do
## TODO: Activate test after order logic has been implemented again
# Has been ignored because order logic in serializer had to be removed to make search work
# Ticket: https://github.com/orgs/puzzle/projects/5/views/1?pane=issue&itemId=51495477
xit 'returns encryptable files for team_id, in order from created_at' do
inbox_folder_receiver = alice.inbox_folder
personal_team_alice = teams(:personal_team_alice)

Expand Down

0 comments on commit 0c05355

Please sign in to comment.