diff options
author | Josh Frye <joshfng@gmail.com> | 2016-06-01 19:27:21 -0400 |
---|---|---|
committer | Josh Frye <joshfng@gmail.com> | 2016-06-02 09:13:59 -0400 |
commit | 8835b7889a6265aba3c6d7ee241abf80a1cf07f3 (patch) | |
tree | 3aa27ff37269152c6f24e1038461acd84f12389e /spec | |
parent | bfccea370310d6f7e5fe16c846ccd073d487a97f (diff) | |
download | gitlab-ce-8835b7889a6265aba3c6d7ee241abf80a1cf07f3.tar.gz |
Flush cache in callback. Add tests
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/issues_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index 9271964166a..fa0d8e1a0cd 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -62,6 +62,21 @@ describe 'Issues', feature: true do expect(issue.reload.assignee).to be_nil end + + it 'updates assigned cache count on change', js: true do + visit edit_namespace_project_issue_path(project.namespace, project, issue) + + expect(page).to have_content "Assignee #{@user.name}" + expect(@user.assigned_open_issues_count).to eq @user.assigned_issues.opened.count + + first('#s2id_issue_assignee_id').click + sleep 2 # wait for ajax stuff to complete + first('.user-result').click + + click_button 'Save changes' + + expect(@user.assigned_open_issues_count).to eq @user.assigned_issues.opened.count + end end describe 'due date', js: true do |