Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
68f9cb6
commit 554678d
Showing
10 changed files
with
50 additions
and
50 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
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 |
---|---|---|
|
@@ -9,5 +9,4 @@ class FriendshipDecorator < Draper::Decorator | |
# object.created_at.strftime("%a %m/%d/%y") | ||
# end | ||
# end | ||
|
||
end |
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 |
---|---|---|
@@ -1,8 +1,7 @@ | ||
FactoryGirl.define do | ||
factory :friendship do | ||
user_id 1 | ||
friend_id 1 | ||
approved "2014-11-29 01:57:48" | ||
friend_id 1 | ||
approved '2014-11-29 01:57:48' | ||
end | ||
|
||
end |
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe "friendships/edit", type: :view do | ||
RSpec.describe 'friendships/edit', type: :view do | ||
before(:each) do | ||
@friendship = assign(:friendship, Friendship.create!( | ||
user_id: 1, | ||
friend_id: 1 | ||
)) | ||
end | ||
|
||
it "renders the edit friendship form" do | ||
it 'renders the edit friendship form' do | ||
render | ||
|
||
assert_select "form[action=?][method=?]", friendship_path(@friendship), "post" do | ||
assert_select 'form[action=?][method=?]', friendship_path(@friendship), 'post' do | ||
|
||
assert_select "input#friendship_user_id[name=?]", "friendship[user_id]" | ||
assert_select 'input#friendship_user_id[name=?]', 'friendship[user_id]' | ||
|
||
assert_select "input#friendship_friend_id[name=?]", "friendship[friend_id]" | ||
assert_select 'input#friendship_friend_id[name=?]', 'friendship[friend_id]' | ||
end | ||
end | ||
end |
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe "friendships/new", type: :view do | ||
RSpec.describe 'friendships/new', type: :view do | ||
before(:each) do | ||
assign(:friendship, Friendship.new( | ||
user_id: 1, | ||
friend_id: 1 | ||
)) | ||
end | ||
|
||
it "renders new friendship form" do | ||
it 'renders new friendship form' do | ||
render | ||
|
||
assert_select "form[action=?][method=?]", friendships_path, "post" do | ||
assert_select 'form[action=?][method=?]', friendships_path, 'post' do | ||
|
||
assert_select "input#friendship_user_id[name=?]", "friendship[user_id]" | ||
assert_select 'input#friendship_user_id[name=?]', 'friendship[user_id]' | ||
|
||
assert_select "input#friendship_friend_id[name=?]", "friendship[friend_id]" | ||
assert_select 'input#friendship_friend_id[name=?]', 'friendship[friend_id]' | ||
end | ||
end | ||
end |
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