You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need a standard ActiveRecord model for a new Sitemap class. A sitemap should:
belong to :searchgov_domain (which can have many sitemaps)
have a non-null, varchar(2000)url database column
the url should be unique
the url should be read-only
have a nullable varchar(255) last_crawl_status column
have a nullable datetime last_crawled_at column
determine the searchgov_domain it belongs to at the time of creation (see SearchgovUrl#set_searchgov_domain)
mix in the Fetchable module, which includes additional validations
The spec should include the line it_should_behave_like 'a record with a fetchable url' to include the default Fetchable tests. This class has a lot in common with the other Fetchable classes: IndexedDocument and SearchgovUrl. Those classes and their specs may be helpful. Try to use Shoulda's simple one-line matchers for standard tests such as validations, etc.
The text was updated successfully, but these errors were encountered:
We need a standard ActiveRecord model for a new Sitemap class. A sitemap should:
:searchgov_domain
(which can have many sitemaps)varchar(2000)
url
database columnurl
should be uniqueurl
should be read-onlyvarchar(255)
last_crawl_status columndatetime
last_crawled_at columnsearchgov_domain
it belongs to at the time of creation (see SearchgovUrl#set_searchgov_domain)Fetchable
module, which includes additional validationsThe spec should include the line
it_should_behave_like 'a record with a fetchable url'
to include the defaultFetchable
tests. This class has a lot in common with the otherFetchable
classes:IndexedDocument
andSearchgovUrl
. Those classes and their specs may be helpful. Try to use Shoulda's simple one-line matchers for standard tests such as validations, etc.The text was updated successfully, but these errors were encountered: