Skip to content

Commit b0f4365

Browse files
nacchan99rakuda-san-desu
authored andcommitted
test: Newsモデルスペックの説明を日本語で統一
1 parent 7e29ea1 commit b0f4365

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/models/news_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
end
1010

1111
describe 'title' do
12-
it 'presence: true' do
12+
it 'タイトルが空の場合は無効になる' do
1313
news.title = nil
1414
expect(news).not_to be_valid
1515
expect(news.errors[:title]).not_to be_empty
1616
end
1717
end
1818

1919
describe 'url' do
20-
it 'presence: true' do
20+
it 'URL が空の場合は無効になる' do
2121
news.url = nil
2222
expect(news).not_to be_valid
2323
expect(news.errors[:url]).not_to be_empty
2424
end
2525

26-
it 'uniqueness: true' do
26+
it 'URL が重複している場合は無効になる' do
2727
create(:news, url: 'https://example.com/test')
2828
duplicate_news = build(:news, url: 'https://example.com/test')
2929
expect(duplicate_news).not_to be_valid
@@ -46,7 +46,7 @@
4646
end
4747

4848
describe 'published_at' do
49-
it 'presence: true' do
49+
it '公開日時が空の場合は無効になる' do
5050
news.published_at = nil
5151
expect(news).not_to be_valid
5252
expect(news.errors[:published_at]).not_to be_empty

0 commit comments

Comments
 (0)