Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 3 commits
  • 2 files changed
  • 0 comments
  • 1 contributor
Apr 11, 2012
Steve Tipton Revert "add sign in links"
This reverts commit abb6709.
7ee81fe
Steve Tipton Revert "add sign in spec"
This reverts commit 57a0975.
b655779
Steve Tipton add home page content 7e3873a
14 app/views/home/index.html.slim
... ... @@ -1,15 +1,3 @@
1 1 h1 Pro Football API
2 2
3   -h2 Request an API Key
4   -
5   -nav.top_navigation_box
6   - - unless controller.controller_name == 'home'
7   - == link_to "← Home", root_path
8   -
9   - = link_to "Github", "https://github.com/sjtipton/pro_football_api"
10   -
11   - - if user_signed_in?
12   - | Signed in as #{current_user.email}. Not you?
13   - = link_to "Sign out", destroy_user_session_path, method: :delete
14   - - else
15   - = link_to "Sign in", new_user_session_path
  3 += link_to "Github", "http://github.com/sjtipton/pro_football_api"
76 spec/acceptance/sign_in_spec.rb
... ... @@ -1,76 +0,0 @@
1   -require 'acceptance/acceptance_helper'
2   -require 'support/devise.rb'
3   -
4   -feature "Sign In" do
5   -
6   - before(:each) do
7   - @user = FactoryGirl.create(:user)
8   - @user.confirm!
9   - end
10   -
11   - context "when not authenticated" do
12   -
13   - describe "an attempt to visit a protected resource" do
14   -
15   - it "should display 'You need to sign in or sign up before continuing.' message in json" do
16   - @login_error = { error: "You need to sign in or sign up before continuing." }
17   - visit teams_path
18   - page.should have_content(@login_error.to_json)
19   - end
20   - end
21   -
22   - describe "an attempt to visit the home page" do
23   -
24   - before(:each) do
25   - visit root_path
26   - end
27   -
28   - it "should display a welcome page" do
29   - current_path.should eq root_path
30   - page.should have_content("Sign in")
31   - end
32   -
33   - context "when User clicks 'Sign in'" do
34   -
35   - before(:each) do
36   - click_link "Sign in"
37   - end
38   -
39   - it "should display a sign in form" do
40   - page.should have_selector("form#user_new")
41   - end
42   -
43   - it "should display a 'Forgot your password' link" do
44   - page.should have_link("Forgot your password")
45   - end
46   -
47   - it "should display a 'Didn't receive confirmation instructions?' link" do
48   - page.should have_link("Didn't receive confirmation instructions?")
49   - end
50   -
51   - context "when User signs in" do
52   -
53   - before(:each) do
54   - fill_in "user_email", with: @user.email
55   - fill_in "user_password", with: @user.password
56   -
57   - click_button "Sign in"
58   - end
59   -
60   - it "should send User back to the home page" do
61   - current_path.should eq root_path
62   - end
63   -
64   - it "should display 'Signed in as [email].'" do
65   - page.should have_content("Signed in as #{@user.email}.")
66   - end
67   -
68   - it "should display 'Not you? [sign out link]'" do
69   - page.should have_content("Not you?")
70   - page.should have_link("Sign out")
71   - end
72   - end
73   - end
74   - end
75   - end
76   -end

No commit comments for this range

Something went wrong with that request. Please try again.