* Wip * Wip * Wip: History * Wip: テストコード作成 * Fix test * Wip * Wip * Wip * Fix test * Wip * Wip * Wip * Wip * なんとか完成、これから動作確認 * spell miss * Change ng rule timings * Fix test * Wip * Fix test * Wip * Fix form * 表示まわりの改善
This commit is contained in:
parent
0779c748a6
commit
7d96d5828e
56 changed files with 2062 additions and 42 deletions
|
@ -113,6 +113,33 @@ RSpec.describe EmojiReactService, type: :service do
|
|||
end
|
||||
end
|
||||
|
||||
context 'with ng rule' do
|
||||
let(:name) { 'ohagi' }
|
||||
|
||||
context 'when rule hits' do
|
||||
before do
|
||||
Fabricate(:custom_emoji, shortcode: 'ohagi')
|
||||
Fabricate(:ng_rule, reaction_type: ['emoji_reaction'])
|
||||
end
|
||||
|
||||
it 'react with emoji' do
|
||||
expect { subject }.to raise_error Mastodon::ValidationError
|
||||
end
|
||||
end
|
||||
|
||||
context 'when rule does not hit' do
|
||||
before do
|
||||
Fabricate(:custom_emoji, shortcode: 'ohagi')
|
||||
Fabricate(:ng_rule, reaction_type: ['emoji_reaction'], emoji_reaction_name: 'aaa')
|
||||
end
|
||||
|
||||
it 'react with emoji' do
|
||||
expect { subject }.to_not raise_error
|
||||
expect(subject.count).to eq 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with custom emoji of remote' do
|
||||
let(:name) { 'ohagi@foo.bar' }
|
||||
let!(:custom_emoji) { Fabricate(:custom_emoji, shortcode: 'ohagi', domain: 'foo.bar', uri: 'https://foo.bar/emoji/ohagi') }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue