mirror of
https://github.com/neocities/neocities.git
synced 2025-07-19 17:16:05 +02:00
one word tags, fix captcha two word mention
This commit is contained in:
parent
9cedbd086d
commit
ba840423a6
5 changed files with 10 additions and 10 deletions
|
@ -103,14 +103,14 @@ describe 'signup' do
|
|||
fill_in_valid
|
||||
fill_in 'tags', with: 'police officer, hi'
|
||||
click_button 'Create Home Page'
|
||||
page.must_have_content /Tag.+cannot have more than one space/
|
||||
page.must_have_content /Tag.+cannot have spaces/
|
||||
end
|
||||
|
||||
it 'fails for tag with too many words' do
|
||||
fill_in_valid
|
||||
fill_in 'tags', with: 'police officer club'
|
||||
fill_in 'tags', with: 'police officer'
|
||||
click_button 'Create Home Page'
|
||||
page.must_have_content /Tag.+cannot be more than two words/
|
||||
page.must_have_content /Tag.+cannot be more than #{Tag::NAME_WORDS_MAX} word/
|
||||
end
|
||||
|
||||
it "fails for tag longer than #{Tag::NAME_LENGTH_MAX} characters" do
|
||||
|
@ -154,10 +154,10 @@ describe 'signup' do
|
|||
|
||||
it 'succeeds with valid tags' do
|
||||
fill_in_valid
|
||||
fill_in 'tags', with: 'derpie, shoujo manga'
|
||||
fill_in 'tags', with: 'derpie, shoujo'
|
||||
click_button 'Create Home Page'
|
||||
page.must_have_content 'Your Feed'
|
||||
Site.last.tags.collect {|t| t.name}.must_equal ['derpie', 'shoujo manga']
|
||||
Site.last.tags.collect {|t| t.name}.must_equal ['derpie', 'shoujo']
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue