diff options
Diffstat (limited to 'spec/features/dashboard')
-rw-r--r-- | spec/features/dashboard/projects_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/features/dashboard/projects_spec.rb b/spec/features/dashboard/projects_spec.rb index 46935662288..8647616101b 100644 --- a/spec/features/dashboard/projects_spec.rb +++ b/spec/features/dashboard/projects_spec.rb @@ -29,6 +29,34 @@ describe 'Dashboard Projects' do end end + context 'when user has access to the project' do + it 'shows role badge' do + visit dashboard_projects_path + + page.within '.user-access-role' do + expect(page).to have_content('Developer') + end + end + + context 'when role changes', :use_clean_rails_memory_store_fragment_caching do + it 'displays the right role' do + visit dashboard_projects_path + + page.within '.user-access-role' do + expect(page).to have_content('Developer') + end + + project.members.last.update(access_level: 40) + + visit dashboard_projects_path + + page.within '.user-access-role' do + expect(page).to have_content('Maintainer') + end + end + end + end + context 'when last_repository_updated_at, last_activity_at and update_at are present' do it 'shows the last_repository_updated_at attribute as the update date' do project.update_attributes!(last_repository_updated_at: Time.now, last_activity_at: 1.hour.ago) |