diff options
author | Rémy Coutable <remy@rymai.me> | 2017-08-11 13:36:03 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-08-11 15:53:17 +0300 |
commit | 1b413bd62fa07930298874dff7477c239d7ab80f (patch) | |
tree | 73b3f74a47e87ab9d377aa3cb2ed47d83422a516 /spec/requests/api/internal_spec.rb | |
parent | c62ae6cfd70d518386fdbcb9714d18ac4f5e8c31 (diff) |
Enable Timecop safe mode
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/requests/api/internal_spec.rb')
-rw-r--r-- | spec/requests/api/internal_spec.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb index 8a2de23716f..e9c30dba8d4 100644 --- a/spec/requests/api/internal_spec.rb +++ b/spec/requests/api/internal_spec.rb @@ -181,13 +181,12 @@ describe API::Internal do describe "POST /internal/allowed", :clean_gitlab_redis_shared_state do context "access granted" do - before do - project.team << [user, :developer] - Timecop.freeze + around do |example| + Timecop.freeze { example.run } end - after do - Timecop.return + before do + project.team << [user, :developer] end context 'with env passed as a JSON' do |