-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add link to create a new application on developer portal. Fixes #69
- Loading branch information
Moncef Belyamani
committed
Jul 16, 2013
1 parent
555a018
commit 4083987
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |