5
3
mirror of https://github.com/tildeverse/lobsters synced 2024-06-20 15:37:04 +00:00
tilde.news/spec/models/story_text_spec.rb
2020-08-25 07:51:09 -05:00

12 lines
273 B
Ruby

require 'rails_helper'
RSpec.describe StoryText, type: :model do
it "has a limit on the story cache field" do
s = StoryText.new
s.body = "Z" * 16_777_218
s.valid?
expect(s.errors[:body]).to eq(['is too long (maximum is 16777215 characters)'])
end
end