Skip to content

Commit

Permalink
Rails 5 fix user conversation and blocked user tests (#327)
Browse files Browse the repository at this point in the history
* use appropriate validation message depending on rails version

* use appropriate validation message depending on rails version

* remove validation text

* Update spec_helper.rb

Remove extra space
  • Loading branch information
Tooyosi authored Jun 20, 2024
1 parent 5668253 commit a7ddf67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions spec/models/blocked_user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
context 'validating' do
it 'should require a user' do
without_user = build :blocked_user, user: nil
expect(without_user).to fail_validation user: "can't be blank"
expect(without_user).to fail_validation
end

it 'should require a blocked_user' do
without_blocked_user = build :blocked_user, blocked_user: nil
expect(without_blocked_user).to fail_validation blocked_user: "can't be blank"
expect(without_blocked_user).to fail_validation
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/models/user_conversation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
context 'validating' do
it 'should require a user' do
without_user = build :user_conversation, user_id: nil
expect(without_user).to fail_validation user: "can't be blank"
expect(without_user).to fail_validation
end
end

Expand Down

0 comments on commit a7ddf67

Please sign in to comment.