Skip to content

Commit 583bb1f

Browse files
committed
Fix test
1 parent 748f17a commit 583bb1f

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

spec/captcha_spec.rb

+23-9
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212

1313
describe '.create' do
1414
it 'should len equal config.len' do
15-
res = RuCaptcha.create(0, 5, 1)
15+
res = RuCaptcha.create(0, 5, 1, 1)
1616
expect(res.length).to eq(2)
1717
expect(res[0].length).to eq(5)
1818
expect(res[1]).not_to eq(nil)
1919
end
2020

2121
it 'should work with color style' do
22-
res = RuCaptcha.create(1, 5, 1)
22+
res = RuCaptcha.create(1, 5, 1, 1)
2323
expect(res.length).to eq(2)
2424
expect(res[0].length).to eq(5)
2525
expect(res[1]).not_to eq(nil)
@@ -48,49 +48,63 @@
4848
end
4949

5050
it 'should len equal 3' do
51-
res = RuCaptcha.create(1, 3, 1)
51+
res = RuCaptcha.create(1, 3, 1, 1)
5252
expect(res.length).to eq(2)
5353
expect(res[0].length).to eq(3)
5454
expect(res[1]).not_to eq(nil)
5555
end
5656

5757
it 'should len equal 4' do
58-
res = RuCaptcha.create(1, 4, 1)
58+
res = RuCaptcha.create(1, 4, 1, 1)
5959
expect(res.length).to eq(2)
6060
expect(res[0].length).to eq(4)
6161
expect(res[1]).not_to eq(nil)
6262
end
6363

6464
it 'should len equal 5' do
65-
res = RuCaptcha.create(1, 5, 1)
65+
res = RuCaptcha.create(1, 5, 1, 1)
6666
expect(res.length).to eq(2)
6767
expect(res[0].length).to eq(5)
6868
expect(res[1]).not_to eq(nil)
6969
end
7070

7171
it 'should len equal 6' do
72-
res = RuCaptcha.create(1, 6, 1)
72+
res = RuCaptcha.create(1, 6, 1, 1)
7373
expect(res.length).to eq(2)
7474
expect(res[0].length).to eq(6)
7575
expect(res[1]).not_to eq(nil)
7676
end
7777

7878
it 'should len equal 7' do
79-
res = RuCaptcha.create(1, 7, 0)
79+
res = RuCaptcha.create(1, 7, 0, 1)
8080
expect(res.length).to eq(2)
8181
expect(res[0].length).to eq(7)
8282
expect(res[1]).not_to eq(nil)
8383
end
8484

85+
it 'should work with outline enable' do
86+
res = RuCaptcha.create(1, 7, 1, 1)
87+
expect(res.length).to eq(2)
88+
expect(res[0].length).to eq(7)
89+
expect(res[1]).not_to eq(nil)
90+
end
91+
92+
it 'should work with outline disable' do
93+
res = RuCaptcha.create(1, 5, 1, 0)
94+
expect(res.length).to eq(2)
95+
expect(res[0].length).to eq(5)
96+
expect(res[1]).not_to eq(nil)
97+
end
98+
8599
it 'should work with strikethrough enable' do
86-
res = RuCaptcha.create(1, 7, 1)
100+
res = RuCaptcha.create(1, 7, 1, 1)
87101
expect(res.length).to eq(2)
88102
expect(res[0].length).to eq(7)
89103
expect(res[1]).not_to eq(nil)
90104
end
91105

92106
it 'should work with strikethrough disable' do
93-
res = RuCaptcha.create(1, 7, 0)
107+
res = RuCaptcha.create(1, 7, 0, 1)
94108
expect(res.length).to eq(2)
95109
expect(res[0].length).to eq(7)
96110
expect(res[1]).not_to eq(nil)

0 commit comments

Comments
 (0)