diff options
author | Jason Goodman <jgoodman@gitlab.com> | 2019-07-03 09:12:15 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-07-03 09:12:15 +0000 |
commit | 7ecffe2987e0f3953489759d080fc263c5cb95c5 (patch) | |
tree | e9a01188b0b731b997a14f795dc44f22a0c7f708 /spec/features/projects/releases | |
parent | d6391c650344af7018de8a3dc6a756b2db9e4f6e (diff) | |
download | gitlab-ce-7ecffe2987e0f3953489759d080fc263c5cb95c5.tar.gz |
Show upcoming status for releases
Add released_at field to releases API
Add released_at column to releases table
Return releases to the API sorted by released_at
Diffstat (limited to 'spec/features/projects/releases')
-rw-r--r-- | spec/features/projects/releases/user_views_releases_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/features/projects/releases/user_views_releases_spec.rb b/spec/features/projects/releases/user_views_releases_spec.rb index 317ffb6a2ff..725d7173bce 100644 --- a/spec/features/projects/releases/user_views_releases_spec.rb +++ b/spec/features/projects/releases/user_views_releases_spec.rb @@ -16,6 +16,7 @@ describe 'User views releases', :js do expect(page).to have_content(release.name) expect(page).to have_content(release.tag) + expect(page).not_to have_content('Upcoming Release') end context 'when there is a link as an asset' do @@ -43,4 +44,15 @@ describe 'User views releases', :js do end end end + + context 'with an upcoming release' do + let(:tomorrow) { Time.zone.now + 1.day } + let!(:release) { create(:release, project: project, released_at: tomorrow ) } + + it 'sees the upcoming tag' do + visit project_releases_path(project) + + expect(page).to have_content('Upcoming Release') + end + end end |