forked from janv/rest_in_place
-
Notifications
You must be signed in to change notification settings - Fork 571
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add spec for double click event to trigger bip field
- Loading branch information
apetrov88
committed
Mar 23, 2015
1 parent
05dd879
commit bbcc8df
Showing
6 changed files
with
32 additions
and
8 deletions.
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
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 |
---|---|---|
|
@@ -155,6 +155,19 @@ | |
expect(find('#email')).to have_content('[email protected]') | ||
end | ||
|
||
it "should be able to use bip_text with double click event type to update a text field" do | ||
@user.save! | ||
visit event_type_user_path(@user) | ||
expect(find('#email')).to have_content('[email protected]') | ||
|
||
bip_text @user, :email, "[email protected]", 'dblclick' | ||
|
||
expect(find('#email')).to have_content('[email protected]') | ||
|
||
visit user_path(@user) | ||
expect(find('#email')).to have_content('[email protected]') | ||
end | ||
|
||
it "should be able to update a field two consecutive times" do | ||
@user.save! | ||
visit user_path(@user) | ||
|
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 |
---|---|---|
|
@@ -6,12 +6,6 @@ | |
//= require best_in_place.purr | ||
//= require_self | ||
|
||
$(document).ready(function() { | ||
/* Activating Best In Place */ | ||
jQuery(".best_in_place").best_in_place(); | ||
}); | ||
|
||
|
||
/* Inicialització en català per a l'extenció 'calendar' per jQuery. */ | ||
/* Writers: ([email protected]). */ | ||
jQuery(function($){ | ||
|
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
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
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
get :double_init | ||
get :show_ajax | ||
get :email_field | ||
get :event_type | ||
end | ||
end | ||
|
||
|