Skip to content

Commit

Permalink
merge relevant and irrelevant attributes tests on project_preferences…
Browse files Browse the repository at this point in the history
…_controller_spec
  • Loading branch information
Tooyosi committed Mar 4, 2024
1 parent 4a91d32 commit 3bd0f1a
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions spec/controllers/api/v1/project_preferences_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,19 +222,13 @@
expect(json_response['project_preferences'].count).to eq(2)
end

it 'returns the correct serialized data' do
it 'returns the correct serialized attributes' do
json_response = JSON.parse(response.body)
first_response = json_response['project_preferences'].first

expect(first_response).to have_key "settings"
end

it 'does not return irrelivant data' do
json_response = JSON.parse(response.body)
first_response = json_response['project_preferences'].first

expect(first_response).to_not have_key "activity_count_by_workflow"
expect(first_response).to_not have_key "email_communication"
expect(first_response).to have_key 'settings'
expect(first_response).to_not have_key 'activity_count_by_workflow'
expect(first_response).to_not have_key 'email_communication'
end
end

Expand Down

0 comments on commit 3bd0f1a

Please sign in to comment.