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
51806d4
commit 2ea8b82
Showing
2 changed files
with
27 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
describe "ActiveAdmin.flash", -> | ||
beforeEach -> | ||
loadFixtures('flashes.html') | ||
@flashes = $(".flashes") | ||
|
||
describe "abstract", -> | ||
it "should add a flash box with class and message" | ||
ActiveAdmin.flash.abstract "a abstract message", "abstract" | ||
flash = @flashes.find(".flash") | ||
expect(flash).toHaveClass("abstract") | ||
expect(flash.text()).toHaveClass("a abstract message") | ||
|
||
describe "error", -> | ||
it "should add a flash box with class and message" | ||
ActiveAdmin.flash.abstract "a error message" | ||
flash = @flashes.find(".flash") | ||
expect(flash).toHaveClass("error") | ||
expect(flash.text()).toHaveClass("a error message") | ||
|
||
describe "notice", -> | ||
it "should add a flash box with class and message" | ||
ActiveAdmin.flash.abstract "a notice message" | ||
flash = @flashes.find(".flash") | ||
expect(flash).toHaveClass("notice") | ||
expect(flash.text()).toHaveClass("a notice message") |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<div class="flashes"> | ||
</div> |