Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Armstrong committed Apr 1, 2012
1 parent 873e47d commit 4ec8d2f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions spec/requests/comments_spec.rb
Expand Up @@ -10,10 +10,10 @@


it "should require login to make a new comment" do it "should require login to make a new comment" do
visit post_url(@p, :subdomain => @f.subdomain) visit post_url(@p, :subdomain => @f.subdomain)
page.should have_css("#new_comment .btn.primary[disabled]") page.should have_css("#new_comment .btn-primary[disabled]")
fill_in 'comment_text', :with => "Some comment" fill_in 'comment_text', :with => "Some comment"
assert_no_difference "Comment.count" do assert_no_difference "Comment.count" do
find('#new_comment .btn.primary').click find('#new_comment .btn-primary').click
end end
current_path.should == signin_path current_path.should == signin_path


Expand All @@ -22,7 +22,7 @@
visit post_url(@p, :subdomain => @f.subdomain) visit post_url(@p, :subdomain => @f.subdomain)
fill_in 'comment_text', :with => "Some comment" fill_in 'comment_text', :with => "Some comment"
assert_difference "Comment.count" do assert_difference "Comment.count" do
find('#new_comment .btn.primary').click find('#new_comment .btn-primary').click
end end
page.should have_content("Some comment") page.should have_content("Some comment")
end end
Expand All @@ -41,7 +41,7 @@
find(".reply-link").click find(".reply-link").click
page.should have_css("#new_comment") page.should have_css("#new_comment")
find('#comment_text').set("this is a reply") find('#comment_text').set("this is a reply")
find("form .btn.primary").click find("form .btn-primary").click
end end
page.should have_content("this is a reply") page.should have_content("this is a reply")
visit post_path(@p) visit post_path(@p)
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/posts_spec.rb
Expand Up @@ -27,7 +27,7 @@
fill_in 'post_title', :with => "Some Title" fill_in 'post_title', :with => "Some Title"
fill_in 'post_text', :with => "Some text" fill_in 'post_text', :with => "Some text"
assert_difference "Post.count" do assert_difference "Post.count" do
find('.btn.primary').click find('.btn-primary').click
end end
page.should have_content("Some Title") page.should have_content("Some Title")
page.should have_content("Some text") page.should have_content("Some text")
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/signup_spec.rb
Expand Up @@ -12,7 +12,7 @@
assert_difference "User.count" do assert_difference "User.count" do
assert_difference "Forum.count" do assert_difference "Forum.count" do
assert_difference "emails_sent" do assert_difference "emails_sent" do
find('form#new_user .btn.primary').click find('form#new_user .btn-primary').click
end end
end end
end end
Expand Down
4 changes: 2 additions & 2 deletions spec/requests/tags_spec.rb
Expand Up @@ -18,12 +18,12 @@
visit account_tags_path visit account_tags_path
current_path.should == account_tags_path current_path.should == account_tags_path
fill_in 'tag_name', :with => "Tag1" fill_in 'tag_name', :with => "Tag1"
find('form#new_tag .btn.primary').click find('form#new_tag .btn-primary').click
within 'table.tags' do within 'table.tags' do
page.should have_content "Tag1" page.should have_content "Tag1"
end end
fill_in 'tag_name', :with => "Tag2" fill_in 'tag_name', :with => "Tag2"
find('form#new_tag .btn.primary').click find('form#new_tag .btn-primary').click
within 'table.tags' do within 'table.tags' do
page.should have_content "Tag2" page.should have_content "Tag2"
end end
Expand Down
2 changes: 1 addition & 1 deletion spec/requests/themes_spec.rb
Expand Up @@ -14,7 +14,7 @@
fill_in 'theme_name', :with => "Test Theme" fill_in 'theme_name', :with => "Test Theme"
fill_in 'theme_css', :with => ".topbar .fill { background: #133783; }" fill_in 'theme_css', :with => ".topbar .fill { background: #133783; }"
assert_difference "Theme.count" do assert_difference "Theme.count" do
find('.btn.primary').click find('.btn-primary').click
end end
t = Theme.last t = Theme.last


Expand Down
2 changes: 1 addition & 1 deletion spec/support/factories.rb
Expand Up @@ -45,7 +45,7 @@ def forum_attributes
end end


def user_attributes def user_attributes
{:email => "user#{user_count}@example.com", :password => "test123", :verified_at => Time.zone.now} {:email => "user#{user_count}@example.com", :password => "test123", :verified_at => Time.zone.now, :created_at => 1.month.ago}
end end


def post_attributes def post_attributes
Expand Down
2 changes: 1 addition & 1 deletion spec/support/ribbot_dsl.rb
Expand Up @@ -2,7 +2,7 @@ def signin_as user, password = 'test123'
visit signin_path visit signin_path
fill_in 'email', :with => user.email fill_in 'email', :with => user.email
fill_in 'password', :with => password fill_in 'password', :with => password
find('form#new_session .btn.primary').click find('form#new_session .btn-primary').click


current_path.should_not == signin_path current_path.should_not == signin_path
end end
Expand Down

0 comments on commit 4ec8d2f

Please sign in to comment.