Fixed specs. Some css fixes

This commit is contained in:
Dmitriy Zaporozhets 2012-03-25 19:44:29 +03:00
parent 8652cd8989
commit 39ea486e1f
9 changed files with 35 additions and 33 deletions

View file

@ -92,10 +92,10 @@ describe "Issues" do
select @user.name, :from => "issue_assignee_id"
end
it { expect { click_button "Save" }.to change {Issue.count}.by(1) }
it { expect { click_button "Submit new issue" }.to change {Issue.count}.by(1) }
it "should add new issue to table" do
click_button "Save"
click_button "Submit new issue"
page.should_not have_content("Add new issue")
page.should have_content @user.name
@ -105,7 +105,7 @@ describe "Issues" do
it "should call send mail" do
Notify.should_not_receive(:new_issue_email)
click_button "Save"
click_button "Submit new issue"
end
end
@ -116,10 +116,10 @@ describe "Issues" do
select @user2.name, :from => "issue_assignee_id"
end
it { expect { click_button "Save" }.to change {Issue.count}.by(1) }
it { expect { click_button "Submit new issue" }.to change {Issue.count}.by(1) }
it "should add new issue to table" do
click_button "Save"
click_button "Submit new issue"
page.should_not have_content("Add new issue")
page.should have_content @user2.name
@ -129,11 +129,11 @@ describe "Issues" do
it "should call send mail" do
Notify.should_receive(:new_issue_email).and_return(stub(:deliver => true))
click_button "Save"
click_button "Submit new issue"
end
it "should send valid email to user" do
click_button "Save"
click_button "Submit new issue"
issue = Issue.last
email = ActionMailer::Base.deliveries.last
email.subject.should have_content("New Issue was created")
@ -177,12 +177,13 @@ describe "Issues" do
describe "fill in" do
before do
fill_in "issue_title", :with => "bug 345"
fill_in "issue_description", :with => "bug description"
end
it { expect { click_button "Save" }.to_not change {Issue.count} }
it { expect { click_button "Save changes" }.to_not change {Issue.count} }
it "should update issue fields" do
click_button "Save"
click_button "Save changes"
page.should have_content @user.name
page.should have_content "bug 345"