Commit 88aea500243c17b891bcf46eae466ddb6e0dab1a

Authored by Cyril Mougel
1 parent e17ea825
Exists in master and in 1 other branch production

Add Acceptance test to unwatch application

app/views/devise/sessions/new.html.haml
... ... @@ -22,7 +22,7 @@
22 22 = f.label :remember_me
23 23  
24 24 %div.buttons
25   - %button{:type => 'submit', :class => 'sign_in'}= "Sign in"
  25 + %button{:type => 'submit', :class => 'sign_in'}=t('.sign_in')
26 26  
27 27 :javascript
28 28 $('a#forgot_password').click(function(){
... ...
config/locales/en.yml
... ... @@ -65,6 +65,9 @@ en:
65 65 omniauth_callbacks:
66 66 failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
67 67 success: "Successfully authenticated from %{kind} account."
  68 + sessions:
  69 + new:
  70 + sign_in: "Sign in"
68 71  
69 72 apps:
70 73 index:
... ...
spec/acceptance/sign_in_with_github_spec.rb
1 1 require 'acceptance/acceptance_helper'
2 2  
3 3 feature 'Sign in with GitHub' do
  4 +
4 5 background do
5 6 Errbit::Config.stub(:github_authentication) { true }
6 7 Fabricate(:user, :github_login => 'nashby')
... ...
spec/acceptance/watch_unwatch_app.rb 0 → 100644
... ... @@ -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
... ...