Commit f709f768 authored by Douwe Maan's avatar Douwe Maan

Make sure test license is setup in all tests.

parent 359c039b
......@@ -26,7 +26,9 @@ WebMock.allow_net_connect!
Spinach.hooks.before_run do
include RSpec::Mocks::ExampleMethods
TestEnv.init(mailer: false)
TestLicense.init
include FactoryGirl::Syntax::Methods
end
......@@ -37,6 +37,10 @@ RSpec.configure do |config|
config.before(:suite) do
TestEnv.init
end
config.before(:all) do
TestLicense.init
end
end
ActiveRecord::Migration.maintain_test_schema!
RSpec.configure do |config|
config.before(:all) do
class TestLicense
def self.init
Gitlab::License.encryption_key = OpenSSL::PKey::RSA.generate(2048)
FactoryGirl.create(:license)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment