2626 end
2727 end
2828
29- describe "POST /delete_feed " do
29+ describe "DELETE /feeds/:feed_id " do
3030 it "deletes a feed given the id" do
3131 FeedRepository . should_receive ( :delete ) . with ( "123" )
3232
33- post "/delete_feed" , feed_id : 123
33+ delete "/feeds/ 123"
3434 end
3535 end
3636
37- describe "GET /add_feed " do
37+ describe "GET /feeds/new " do
3838 context "when the feed url is valid" do
3939 let ( :feed_url ) { "http://example.com/" }
4040 let ( :feed ) { stub }
4343 AddNewFeed . should_receive ( :add ) . with ( feed_url ) . and_return ( feed )
4444 FetchFeeds . should_receive ( :enqueue ) . with ( [ feed ] )
4545
46- post "/add_feed " , feed_url : feed_url
46+ post "/feeds " , feed_url : feed_url
4747
4848 last_response . status . should be 302
4949 URI ::parse ( last_response . location ) . path . should eq "/"
5656 it "adds the feed and queues it to be fetched" do
5757 AddNewFeed . should_receive ( :add ) . with ( feed_url ) . and_return ( nil )
5858
59- post "/add_feed " , feed_url : feed_url
59+ post "/feeds " , feed_url : feed_url
6060
6161 page = last_response . body
6262 page . should have_tag ( ".error" )
6363 end
6464 end
6565 end
6666
67- describe "GET /import" do
67+ describe "GET /feeds/ import" do
6868 it "displays the import options" do
69- get "/import"
69+ get "/feeds/ import"
7070
7171 page = last_response . body
7272 page . should have_tag ( "input#opml_file" )
8080 it "parse OPML and starts fetching" do
8181 ImportFromOpml . should_receive ( :import ) . once
8282
83- post "/import" , { "opml_file" => opml_file }
83+ post "/feeds/ import" , { "opml_file" => opml_file }
8484
8585 last_response . status . should be 302
8686 URI ::parse ( last_response . location ) . path . should eq "/setup/tutorial"
8787 end
8888 end
8989
90- describe "GET /export" do
90+ describe "GET /feeds/ export" do
9191 let ( :some_xml ) { "<xml>some dummy opml</xml>" }
9292 before { Feed . stub ( :all ) }
9393
9494 it "returns an OPML file" do
9595 ExportToOpml . any_instance . should_receive ( :to_xml ) . and_return ( some_xml )
9696
97- get "/export"
97+ get "/feeds/ export"
9898
9999 last_response . body . should eq some_xml
100100 last_response . header [ "Content-Type" ] . should include 'xml'
101101 end
102102 end
103- end
103+ end
0 commit comments