Added test for due date

This commit is contained in:
Phil Hughes 2016-09-14 19:22:36 +01:00
parent babaaca43c
commit 4c5c5ab314

View file

@ -4,7 +4,7 @@ describe 'Dashboard Todos', feature: true do
let(:user) { create(:user) }
let(:author) { create(:user) }
let(:project) { create(:project, visibility_level: Gitlab::VisibilityLevel::PUBLIC) }
let(:issue) { create(:issue) }
let(:issue) { create(:issue, due_date: Date.today) }
describe 'GET /dashboard/todos' do
context 'User does not have todos' do
@ -28,6 +28,12 @@ describe 'Dashboard Todos', feature: true do
expect(page).to have_selector('.todos-list .todo', count: 1)
end
it 'shows due date as today' do
page.within first('.todo') do
expect(page).to have_content 'Due today'
end
end
describe 'deleting the todo' do
before do
first('.done-todo').click