Skip to content

Commit

Permalink
Add link to create a new application on developer portal. Fixes #69
Browse files Browse the repository at this point in the history
  • Loading branch information
Moncef Belyamani committed Jul 16, 2013
1 parent 555a018 commit 4083987
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/home/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%h3 Ohana Developers
%p
- if user_signed_in?
Welcome back #{@user.name}! Create a new application or #{link_to 'view', edit_user_registration_path} your existing ones.
Welcome back #{@user.name}! #{link_to "Create a new application", new_api_application_path} or #{link_to 'view', api_applications_path} your existing ones.
- else
Sign up for a developer account, or sign in.
26 changes: 26 additions & 0 deletions spec/features/homepage_text_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
feature "Visit home page after signing in" do
# The 'login_as' method is a Warden test helper that
# allows you to simulate a user login without having
# to fill in the sign in form every time. Since we're
# not testing the signing in part of the app here, we
# can take advantage of the Warden helper and speed up
# our integration tests.

# All other methods are part of the Capybara DSL
# https://github.com/jnicklas/capybara
background do
user = FactoryGirl.create(:user)
login_as(user, :scope => :user)
visit ('/')
end

scenario "click 'create a new application' link" do
click_link "Create a new application"
expect(page).to have_content "Register a new application"
end

scenario "click 'view' link" do
click_link "view"
expect(page).to have_content "Developer Applications"
end
end

0 comments on commit 4083987

Please sign in to comment.