Commit 88aea500243c17b891bcf46eae466ddb6e0dab1a
1 parent
e17ea825
Exists in
master
and in
1 other branch
Add Acceptance test to unwatch application
Showing
4 changed files
with
28 additions
and
1 deletions
Show diff stats
app/views/devise/sessions/new.html.haml
config/locales/en.yml
spec/acceptance/sign_in_with_github_spec.rb
... | ... | @@ -0,0 +1,23 @@ |
1 | +require 'acceptance/acceptance_helper' | |
2 | + | |
3 | +feature 'A user can watch and unwatch an application' do | |
4 | + | |
5 | + let!(:app) { Fabricate(:app) } | |
6 | + let!(:user) do | |
7 | + user = Fabricate(:user) | |
8 | + app.watchers.create!( | |
9 | + :user_id => user.id | |
10 | + ) | |
11 | + user.reload | |
12 | + end | |
13 | + | |
14 | + scenario 'log in watch a project and unwatch it' do | |
15 | + visit '/' | |
16 | + fill_in :user_email, :with => user.email | |
17 | + fill_in :user_password, :with => 'password' | |
18 | + click_on I18n.t('devise.sessions.new.sign_in') | |
19 | + click_on I18n.t('apps.show.unwatch') | |
20 | + expect(page).to have_content(I18n.t('apps.index.no_apps') | |
21 | + end | |
22 | + | |
23 | +end | ... | ... |