diff options
author | Philip Arndt <git@arndt.io> | 2014-12-04 14:06:02 -0800 |
---|---|---|
committer | Philip Arndt <git@arndt.io> | 2014-12-04 14:06:02 -0800 |
commit | c5d248b280ca975579d3a09ae8b7253afa2b0752 (patch) | |
tree | e696de404d22f38f03a767c6376d7198e433fbca /spec | |
parent | 6c21f7a29bcb7824ba634b766643c8ff7db876cd (diff) | |
download | refinerycms-blog-c5d248b280ca975579d3a09ae8b7253afa2b0752.tar.gz refinerycms-blog-c5d248b280ca975579d3a09ae8b7253afa2b0752.tar.bz2 refinerycms-blog-c5d248b280ca975579d3a09ae8b7253afa2b0752.zip |
Switched flags to the new SVG locale icons
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/refinery/blog/admin/categories_spec.rb | 14 | ||||
-rw-r--r-- | spec/features/refinery/blog/admin/posts_spec.rb | 24 |
2 files changed, 19 insertions, 19 deletions
diff --git a/spec/features/refinery/blog/admin/categories_spec.rb b/spec/features/refinery/blog/admin/categories_spec.rb index 907c6a0..b3e3f31 100644 --- a/spec/features/refinery/blog/admin/categories_spec.rb +++ b/spec/features/refinery/blog/admin/categories_spec.rb @@ -44,10 +44,10 @@ describe "Categories admin", type: :feature do expect(Refinery::Blog::Category.count).to eq(1) end - it "shows locale flag for category" do + it "shows locale for category" do click_link "Manage" within "#category_#{@c.id}" do - expect(page).to have_css("img[src='/assets/refinery/icons/flags/en.png']") + expect(page).to have_css(".locale_icon.en") end end @@ -73,7 +73,7 @@ describe "Categories admin", type: :feature do visit refinery.blog_admin_posts_path click_link "Create new category" within "#switch_locale_picker" do - click_link "ru" + click_link "RU" end fill_in "Title", :with => ru_category_title click_button "Save" @@ -85,17 +85,17 @@ describe "Categories admin", type: :feature do expect(Refinery::Blog::Category.count).to eq(1) end - it "shows locale flag for category" do + it "shows locale for category" do click_link "Manage" within "#category_#{@c.id}" do - expect(page).to have_css("img[src='/assets/refinery/icons/flags/ru.png']") + expect(page).to have_css(".locale_icon.ru") end end - it "does not show locale flag for primary locale" do + it "does not show locale for primary locale" do click_link "Manage" within "#category_#{@c.id}" do - expect(page).not_to have_css("img[src='/assets/refinery/icons/flags/en.png']") + expect(page).not_to have_css(".locale_icon.en") end end diff --git a/spec/features/refinery/blog/admin/posts_spec.rb b/spec/features/refinery/blog/admin/posts_spec.rb index 4efbc66..ca45fd3 100644 --- a/spec/features/refinery/blog/admin/posts_spec.rb +++ b/spec/features/refinery/blog/admin/posts_spec.rb @@ -208,10 +208,10 @@ module Refinery expect(Refinery::Blog::Post.count).to eq(1) end - it "shows locale flag for post" do + it "shows locale for post" do within "#post_#{@p.id}" do - expect(page).to have_css("img[src='/assets/refinery/icons/flags/en.png']") + expect(page).to have_css(".locale_icon.en") end end @@ -234,7 +234,7 @@ module Refinery before do click_link "Create new post" within "#switch_locale_picker" do - click_link "ru" + click_link "RU" end fill_in "Title", :with => ru_page_title fill_in "post_body", :with => "One post in my blog" @@ -253,15 +253,15 @@ module Refinery end end - it "shows locale flag for post" do + it "shows locale for post" do within "#post_#{@p.id}" do - expect(page).to have_css("img[src='/assets/refinery/icons/flags/ru.png']") + expect(page).to have_css(".locale_icon.ru") end end - it "does not show locale flag for primary locale" do + it "does not show locale for primary locale" do within "#post_#{@p.id}" do - expect(page).not_to have_css("img[src='/assets/refinery/icons/flags/en.png']") + expect(page).not_to have_css(".locale_icon.en") end end @@ -292,10 +292,10 @@ module Refinery visit refinery.blog_admin_posts_path end - it "shows both locale flags for post" do + it "shows both locales for post" do within "#post_#{blog_post.id}" do - expect(page).to have_css("img[src='/assets/refinery/icons/flags/en.png']") - expect(page).to have_css("img[src='/assets/refinery/icons/flags/ru.png']") + expect(page).to have_css(".locale_icon.en") + expect(page).to have_css(".locale_icon.ru") end end @@ -303,7 +303,7 @@ module Refinery it "succeeds" do within "#post_#{blog_post.id}" do - click_link("En") + click_link("EN") end expect(current_path).to eq(refinery.edit_blog_admin_post_path(blog_post)) fill_in "Title", :with => "New Post Title" @@ -317,7 +317,7 @@ module Refinery describe "edit the post in secondary locale" do it "succeeds" do within "#post_#{blog_post.id}" do - click_link("ru") + click_link("RU") end fill_in "Title", :with => "Нов" |