Commit 243a6689 authored by Doug Stull's avatar Doug Stull

Fix tests being skipped

- remove around hook as it was causing tests to be skipped.
parent d7b72c34
......@@ -2,7 +2,7 @@
module Groups
module GroupLinks
class CreateService < BaseService
class CreateService < Groups::BaseService
def execute(shared_group)
unless group && shared_group &&
can?(current_user, :admin_group_member, shared_group) &&
......
......@@ -9,16 +9,17 @@ RSpec.describe Groups::GroupLinksController do
let(:group_member) { create(:user) }
let!(:project) { create(:project, group: shared_group) }
around do |example|
travel_to DateTime.new(2019, 4, 1) { example.run }
end
before do
travel_to DateTime.new(2019, 4, 1)
sign_in(user)
shared_with_group.add_developer(group_member)
end
after do
travel_back
end
shared_examples 'placeholder is passed as `id` parameter' do |action|
it 'returns a 404' do
post(
......
......@@ -9,8 +9,12 @@ RSpec.describe Groups::GroupMembersController do
let(:group) { create(:group, :public) }
let(:membership) { create(:group_member, group: group) }
around do |example|
travel_to DateTime.new(2019, 4, 1) { example.run }
before do
travel_to DateTime.new(2019, 4, 1)
end
after do
travel_back
end
describe 'GET index' do
......
......@@ -8,15 +8,16 @@ RSpec.describe Projects::GroupLinksController do
let_it_be(:project) { create(:project, :private, group: group2) }
let_it_be(:user) { create(:user) }
around do |example|
travel_to DateTime.new(2019, 4, 1) { example.run }
end
before do
travel_to DateTime.new(2019, 4, 1)
project.add_maintainer(user)
sign_in(user)
end
after do
travel_back
end
describe '#create' do
shared_context 'link project to group' do
before do
......
......@@ -7,8 +7,12 @@ RSpec.describe Projects::ProjectMembersController do
let(:group) { create(:group, :public) }
let(:project) { create(:project, :public) }
around do |example|
travel_to DateTime.new(2019, 4, 1) { example.run }
before do
travel_to DateTime.new(2019, 4, 1)
end
after do
travel_back
end
describe 'GET index' do
......
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