Test click_button by id
This commit is contained in:
parent
e113e2e9c5
commit
971e98450b
|
@ -63,6 +63,14 @@ shared_examples_for "session" do
|
|||
results['foo'].should == 'blah'
|
||||
end
|
||||
end
|
||||
|
||||
context "with id given" do
|
||||
it "should submit the associated form" do
|
||||
@session.click_button('awe123')
|
||||
results = YAML.load(@session.body)
|
||||
results['foo'].should == 'blah'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<input type="submit" name="form[awesome]" value="awesome"/>
|
||||
<input type="submit" name="form[crappy]" value="crappy"/>
|
||||
<input type="submit" name="form[awesome]" id="awe123" value="awesome"/>
|
||||
<input type="submit" name="form[crappy]" id="crap321" value="crappy"/>
|
||||
</p>
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue