Permalink
Browse files

fixing tests

  • Loading branch information...
1 parent 873e47d commit 4ec8d2fcc6d91b2584d14477a8dad82dcf554a40 Brian Armstrong committed Apr 1, 2012
View
8 spec/requests/comments_spec.rb
@@ -10,10 +10,10 @@
it "should require login to make a new comment" do
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"
assert_no_difference "Comment.count" do
- find('#new_comment .btn.primary').click
+ find('#new_comment .btn-primary').click
end
current_path.should == signin_path
@@ -22,7 +22,7 @@
visit post_url(@p, :subdomain => @f.subdomain)
fill_in 'comment_text', :with => "Some comment"
assert_difference "Comment.count" do
- find('#new_comment .btn.primary').click
+ find('#new_comment .btn-primary').click
end
page.should have_content("Some comment")
end
@@ -41,7 +41,7 @@
find(".reply-link").click
page.should have_css("#new_comment")
find('#comment_text').set("this is a reply")
- find("form .btn.primary").click
+ find("form .btn-primary").click
end
page.should have_content("this is a reply")
visit post_path(@p)
View
2 spec/requests/posts_spec.rb
@@ -27,7 +27,7 @@
fill_in 'post_title', :with => "Some Title"
fill_in 'post_text', :with => "Some text"
assert_difference "Post.count" do
- find('.btn.primary').click
+ find('.btn-primary').click
end
page.should have_content("Some Title")
page.should have_content("Some text")
View
2 spec/requests/signup_spec.rb
@@ -12,7 +12,7 @@
assert_difference "User.count" do
assert_difference "Forum.count" do
assert_difference "emails_sent" do
- find('form#new_user .btn.primary').click
+ find('form#new_user .btn-primary').click
end
end
end
View
4 spec/requests/tags_spec.rb
@@ -18,12 +18,12 @@
visit account_tags_path
current_path.should == account_tags_path
fill_in 'tag_name', :with => "Tag1"
- find('form#new_tag .btn.primary').click
+ find('form#new_tag .btn-primary').click
within 'table.tags' do
page.should have_content "Tag1"
end
fill_in 'tag_name', :with => "Tag2"
- find('form#new_tag .btn.primary').click
+ find('form#new_tag .btn-primary').click
within 'table.tags' do
page.should have_content "Tag2"
end
View
2 spec/requests/themes_spec.rb
@@ -14,7 +14,7 @@
fill_in 'theme_name', :with => "Test Theme"
fill_in 'theme_css', :with => ".topbar .fill { background: #133783; }"
assert_difference "Theme.count" do
- find('.btn.primary').click
+ find('.btn-primary').click
end
t = Theme.last
View
2 spec/support/factories.rb
@@ -45,7 +45,7 @@ def forum_attributes
end
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
def post_attributes
View
2 spec/support/ribbot_dsl.rb
@@ -2,7 +2,7 @@ def signin_as user, password = 'test123'
visit signin_path
fill_in 'email', :with => user.email
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
end

0 comments on commit 4ec8d2f

Please sign in to comment.