Commit d225db93 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'fix-datetime-dependent-humanization-tests' into 'master'

Resolve "Fix tests that fail due to humanization of "29 days" vs "1 month""

See merge request gitlab-org/gitlab!52972
parents 23674e05 50ad39b0
......@@ -9,6 +9,10 @@ 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
sign_in(user)
......
......@@ -9,6 +9,10 @@ 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 }
end
describe 'GET index' do
it 'renders index with 200 status code' do
get :index, params: { group_id: group }
......
......@@ -8,6 +8,10 @@ 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
project.add_maintainer(user)
sign_in(user)
......
......@@ -7,6 +7,10 @@ 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 }
end
describe 'GET index' do
it 'has the project_members address with a 200 status code' do
get :index, params: { namespace_id: project.namespace, project_id: project }
......
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