-
Notifications
You must be signed in to change notification settings - Fork 5
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
Trey Terrell
committed
Apr 5, 2014
1 parent
c49d2d2
commit 3eba4b8
Showing
4 changed files
with
65 additions
and
11 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
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
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
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,31 @@ | ||
require 'spec_helper' | ||
|
||
describe "fun functionality" do | ||
let(:asset) {GenericAsset.new} | ||
context "when content is set" do | ||
before(:each) do | ||
asset.title = "Test Title" | ||
end | ||
it "should return" do | ||
expect(asset.title).to eq "Test Title" | ||
end | ||
context "after it is saved" do | ||
before(:each) do | ||
asset.save | ||
end | ||
it "should maintain that data" do | ||
a = GenericAsset.find(asset.pid) | ||
expect(a.title).to eq "Test Title" | ||
end | ||
it "should work on reload" do | ||
asset.reload | ||
expect(asset.title).to eq "Test Title" | ||
end | ||
it "should not call datastream content" do | ||
asset.reload | ||
expect(asset.descMetadata).not_to receive(:datastream_content) | ||
expect(asset.title).to eq "Test Title" | ||
end | ||
end | ||
end | ||
end |