File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ class Question < ApplicationRecord
5
5
has_many :answers , dependent : :destroy
6
6
has_many :inboxes , dependent : :destroy
7
7
8
- validates :content , length : { maximum : 255 }
8
+ validates :content , length : { maximum : 512 }
9
9
10
10
before_destroy do
11
11
rep = Report . where ( target_id : self . id , type : 'Reports::Question' )
Original file line number Diff line number Diff line change 16
16
expect ( @question . content ) . to match 'Is this a question?'
17
17
end
18
18
19
- it 'does not save questions longer than 255 characters' do
20
- @question . content = 'X' * 256
19
+ it 'does not save questions longer than 512 characters' do
20
+ @question . content = 'X' * 513
21
21
expect { @question . save! } . to raise_error ( ActiveRecord ::RecordInvalid )
22
22
end
23
23
You can’t perform that action at this time.
0 commit comments