summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2016-08-19 10:40:37 +0000
committerazul <azul@riseup.net>2016-08-19 10:40:37 +0000
commit67302ca1986a66a6d278c34216ad33f4c65a018e (patch)
treed55e4c4dd3a6612e04e0fd40e736c8b6d4342762 /test/integration
parent44910c0909f28791fe6725fa76301e5111ece3b4 (diff)
parentfbad882075e745ab7afbe5f89c67544fb3c607c3 (diff)
Merge branch 'bugfix/send-406-on-unsupported-format' into 'develop'
Bugfix/send 406 on unsupported format See merge request !5
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/api/smtp_cert_test.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/integration/api/smtp_cert_test.rb b/test/integration/api/smtp_cert_test.rb
index 53382c1..3adddfd 100644
--- a/test/integration/api/smtp_cert_test.rb
+++ b/test/integration/api/smtp_cert_test.rb
@@ -3,13 +3,8 @@ require 'openssl'
class SmtpCertTest < ApiIntegrationTest
- setup do
- @testcode = InviteCode.new
- @testcode.save!
- end
-
test "retrieve smtp cert" do
- @user = FactoryGirl.create :user, effective_service_level_code: 2, :invite_code => @testcode.invite_code
+ @user = create_invited_user effective_service_level_code: 2
login
post smtp_cert_url, {}, RACK_ENV
assert_text_response
@@ -20,7 +15,7 @@ class SmtpCertTest < ApiIntegrationTest
end
test "cert and key" do
- @user = FactoryGirl.create :user, effective_service_level_code: 2, :invite_code => @testcode.invite_code
+ @user = create_invited_user effective_service_level_code: 2
login
post smtp_cert_url, {}, RACK_ENV
assert_text_response
@@ -32,7 +27,7 @@ class SmtpCertTest < ApiIntegrationTest
end
test "fingerprint is stored with identity" do
- @user = FactoryGirl.create :user, effective_service_level_code: 2, :invite_code => @testcode.invite_code
+ @user = create_invited_user effective_service_level_code: 2
login
post smtp_cert_url, {}, RACK_ENV
assert_text_response
@@ -46,7 +41,6 @@ class SmtpCertTest < ApiIntegrationTest
end
test "fetching smtp certs requires email account" do
-
login
post smtp_cert_url, {}, RACK_ENV
assert_access_denied