5 it
"is valid with valid attributes" do
6 feed_item
= FactoryGirl
.build(:feed_item)
7 expect(feed_item
).to be_valid
10 it
"is not valid without a feed name" do
11 feed_item
= FactoryGirl
.build(:feed_item, feed_name
: nil)
12 expect(feed_item
).not_to be_valid
15 it
"is not valid without a title" do
16 feed_item
= FactoryGirl
.build(:feed_item, title
: nil)
17 expect(feed_item
).not_to be_valid
20 it
"is not valid without a description" do
21 feed_item
= FactoryGirl
.build(:feed_item, description
: nil)
22 expect(feed_item
).not_to be_valid
25 it
"is not valid with an improper feed name" do
26 feed_item
= FactoryGirl
.build(:feed_item, feed_name
: 'feed name')
27 expect(feed_item
).not_to be_valid
28 feed_item
= FactoryGirl
.build(:feed_item, feed_name
: 'feed%20name')
29 expect(feed_item
).not_to be_valid
30 feed_item
= FactoryGirl
.build(:feed_item, feed_name
: 'feed&name')
31 expect(feed_item
).not_to be_valid
32 feed_item
= FactoryGirl
.build(:feed_item, feed_name
: 'feed%26name')
33 expect(feed_item
).not_to be_valid
34 feed_item
= FactoryGirl
.build(:feed_item, feed_name
: 'feed<name')
35 expect(feed_item
).not_to be_valid
36 feed_item
= FactoryGirl
.build(:feed_item, feed_name
: 'feed%3Cname')
37 expect(feed_item
).not_to be_valid
38 feed_item
= FactoryGirl
.build(:feed_item, feed_name
: 'feed%name')
39 expect(feed_item
).not_to be_valid
40 feed_item
= FactoryGirl
.build(:feed_item, feed_name
: 'index')
41 expect(feed_item
).not_to be_valid
42 feed_item
= FactoryGirl
.build(:feed_item, feed_name
: 'show')
43 expect(feed_item
).not_to be_valid
44 feed_item
= FactoryGirl
.build(:feed_item, feed_name
: 'update')
45 expect(feed_item
).not_to be_valid
46 feed_item
= FactoryGirl
.build(:feed_item, feed_name
: 'action')
47 expect(feed_item
).not_to be_valid